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

Bash history pollution #31

Open
janosimas opened this issue May 21, 2021 · 4 comments
Open

Bash history pollution #31

janosimas opened this issue May 21, 2021 · 4 comments

Comments

@janosimas
Copy link

Currently, every command executed by the extension goes to bash history.
If I'm investigation my code, that means a lot of commands.

I suggest that the commands from the extension skip the history.
I found two approaches for this:
https://stackoverflow.com/a/29188490
https://unix.stackexchange.com/a/10923

The first one looks simpler but it's dependent of the system settings.

@rlivings39
Copy link
Owner

I think what could be done here is to leverage the TerminalOptions to allow you to add that environment variable. The proposal would be for the extension to have a setting like "Environment variables" that would be an object specifying env vars and their values. The extension would then pass that along when creating the terminal.

Sound reasonable?

@janosimas
Copy link
Author

Feels like an overkill for me, I'll think a little about it.
Do you know how gitlens works on that?

@rlivings39
Copy link
Owner

rlivings39 commented May 22, 2021

Even simpler, what if you leveraged the HISTIGNORE variable in your .bashrc? Setting that for me seems to have done the trick: export HISTIGNORE='*rlivings39.fzf-quick-open*'

I've not seen how gitlens works with that. I'm not in favor of disabling history by default for all users as I find the history integration very helpful. Often I'll switch to the terminal and hit Ctrl+p to do another search, change folder, etc.

@janosimas
Copy link
Author

I can use the .bashrc suggestion but I don't think this is a good general solution.

What about a configuration flag?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants