question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow to run `python.execInTerminal` command without adding to terminal history for *nix shells

See original GitHub issue

Currently the python.execInTerminal command ends up in the shell history. I find this quite annoying since I generally do not need stuff my editor executes in the shell history.

It would be nice if this could be disabled. Both bash and zsh (and probably most other shells as well) have a setting to not add commands to the history when they are prefixed with a space. On the other hand, when this feature is not enabled/supported, there are no disadvantages of prefixing the line that’s sent to the shell with a space.

So my feature request is to either always add a space at the beginning of any command that’s sent to the shell, or to add a setting that lets me enable this if I want to use it. If there’s any interest in this I could probably try sending a PR for this (especially since it sounds like a pretty easy thing to implement).

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ThiefMastercommented, Aug 21, 2019

I don’t think cmd has any persistent history, not sure about powershell. Unfortunately most google results related to it are very old, but there doesn’t seem to be a way to remove something from the history without clearing everything: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_history?view=powershell-7

So this feature would only apply to *nix shells - I guess if there was no setting for it, it could simply be enabled only on those systems, and if there was a setting I guess it would have to mention in the description that it only works with certain shells.

Since I think it’s a useful shell feature I opened an issue in the PS repo, suggesting it as a feature there: PowerShell/PowerShell#10403

0reactions
luabudcommented, Oct 31, 2019

Thanks for the suggestion! I believe this would be better addressed upstream. You can try making the suggestion in the VS Code repo . We’re not planning to do this in the extension though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

command 'python.execInTerminal-icon' not found
Did you install Python correctly? Open an integrated Terminal in VS Code and run python --version , can you get the right version...
Read more >
nix-shell
In the environment of the derivation, run the shell command cmd. This command is executed in an interactive shell. (Use --run to use...
Read more >
Command-line shell - ArchWiki
A Unix shell is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and for Unix-like ......
Read more >
run bash file terminal Code Example
Try 'apt --fix-broken install' with no packages (or specify a solution). ... 'react-scripts' is not recognized as an internal or external command, operable ......
Read more >
How to Get the Command History in Python? - Finxter
Method 6: Use Up and Down Arrows If You're Running Python Shell From Command Line. If you've opened a Python session from the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found