Allow to run `python.execInTerminal` command without adding to terminal history for *nix shells
See original GitHub issueCurrently 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:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
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-7So 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
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.