Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try avoid putting run commands into shell history #21998

Open
Tyriar opened this issue Sep 15, 2023 · 10 comments
Open

Try avoid putting run commands into shell history #21998

Tyriar opened this issue Sep 15, 2023 · 10 comments
Assignees
Labels
area-environments Features relating to handling interpreter environments feature-request Request for new features or functionality needs proposal Need to make some design decisions

Comments

@Tyriar
Copy link
Member

Tyriar commented Sep 15, 2023

A user in microsoft/vscode#192943 (comment) is using profile environments to try workaround source and run commands being added to shell history, leading to more problems:

I actually need this to prevent VS Code from cluttering my shell history, otherwise my history is filled up with entries such as source /some/path/.venv/bin/activate.fish and /some/path/.venv/bin/python /some/path/src/myscript.py or subsequent commands I tried for that specific project which are irrelevant as my shell history in my general day to day usage!

Shells have various ways of avoiding adding entries into history. For example in bash you can add a space to the start of the command to have it not enter history. There are also some HIST* variables that define how history behaviors which are worth a read.

@Tyriar Tyriar added the feature-request Request for new features or functionality label Sep 15, 2023
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Sep 15, 2023
@karrtikr
Copy link

Related issues: #7041 microsoft/vscode#85887 #9316 microsoft/vscode#85887 microsoft/vscode#87779

This is less of a problem now that we don't send activation commands in terminal, only when executing or debugging a file, which is maybe okay to put in shell history.

microsoft/vscode#87779 hints that debugging is maybe solved now?

@karrtikr karrtikr removed their assignment Sep 19, 2023
@github-actions github-actions bot added the info-needed Issue requires more information from poster label Sep 19, 2023
@karrtikr karrtikr added area-environments Features relating to handling interpreter environments needs spike Label for issues that need investigation before they can be worked on. and removed info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team labels Sep 19, 2023
@karrtikr karrtikr changed the title Try avoid putting activation and run commands into shell history Try avoid putting run commands into shell history Sep 19, 2023
@karrtikr karrtikr added needs community feedback Awaiting community feedback and removed needs spike Label for issues that need investigation before they can be worked on. labels Sep 19, 2023
@github-actions
Copy link

Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.

@Tyriar
Copy link
Member Author

Tyriar commented Sep 19, 2023

This is less of a problem now that we don't send activation commands in terminal, only when executing or debugging a file, which is maybe okay to put in shell history.

Ideally the extension shouldn't be adding anything to history imo.

@brettcannon
Copy link
Member

Thank you for submitting your feature request and everyone who considered it! Unfortunately, this issue did not receive enough votes over the allotted time, and so we are closing the issue.

@brettcannon brettcannon closed this as not planned Won't fix, can't repro, duplicate, stale Nov 16, 2023
@github-actions github-actions bot removed the needs community feedback Awaiting community feedback label Nov 16, 2023
@Tyriar
Copy link
Member Author

Tyriar commented Nov 16, 2023

I think this would essentially be fixed by adding a single space in front of some of the sendText activation commands.

@Tyriar Tyriar reopened this Nov 16, 2023
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Nov 16, 2023
@karthiknadig
Copy link
Member

@Tyriar For debugging, the DAP client in VSCODE has to do this. Debugger just does a run-in-terminal request.

@karthiknadig karthiknadig added needs proposal Need to make some design decisions and removed triage-needed Needs assignment to the proper sub-team labels Nov 17, 2023
@Tyriar
Copy link
Member Author

Tyriar commented Nov 17, 2023

@karthiknadig if you put a space in front of the command you request, some shells will not add it to history

@karthiknadig
Copy link
Member

@Tyriar This feels like VS Code should handle it at least for debugger scenarios. Then it would be something that is controlled by a setting in VS Code, than something that every DAP server has to implement.

@Tyriar
Copy link
Member Author

Tyriar commented Nov 17, 2023

@karthiknadig perhaps, not sure it's been brought up with the debugger folks. The main example this was issue was specifically about the activate command which is still an option I believe

@brettcannon
Copy link
Member

The main example this was issue was specifically about the activate command which is still an option I believe

For now, but may very well go away once terminal activation is solid enough to launch to a 100% of stable.

@anthonykim1 anthonykim1 self-assigned this Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-environments Features relating to handling interpreter environments feature-request Request for new features or functionality needs proposal Need to make some design decisions
Projects
None yet
Development

No branches or pull requests

5 participants