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

Prepend commands in run_cmd with a space to prevent them to be stored in the history #109

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

paullaffitte
Copy link

Hello,

First of all, thanks for this tools, it's awesome!

However I have a small issue with the history, in the function __go_to_window_or_session_path, it calls run_cmd "cd \"$target_path\"" and run_cmd "clear", which get added to my history. I find this a bit annoying since I didn't typed those commands myself. I would appreciate if it would be possible to disable this behavior.

An idea to fix that issue is to prepend those commands with a <space> character. If the user has set the variable HISTCONTROL=ignorespace or HISTCONTROL=ignoreboth, the command will be ignored from the history.

In the case some users would want to keep those commands in their history, we could add an environment variable TMUXIFIER_KEEP_HISTORY, but I'm not sure that anybody would want that ?

@paullaffitte
Copy link
Author

Thanks @aguilerafabian for approving my changes! Is there anything missing before merging?

@aguilerafabian
Copy link

I just dont know...the main collaborator maybe?
I made the changes you propose by myself also...then I found out you already submitted a PR...

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

Successfully merging this pull request may close these issues.

2 participants