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

preexec_function gets inaccurate arguments in tmux #74

Closed
JeffFaer opened this issue Oct 31, 2018 · 3 comments
Closed

preexec_function gets inaccurate arguments in tmux #74

JeffFaer opened this issue Oct 31, 2018 · 3 comments

Comments

@JeffFaer
Copy link

Observed problem: Exiting from tmux executes all preexec_functions with the previous command.

Expected behavior: $1 should probably be empty or "logout", since that's what tmux briefly shows on my screen before exiting.

Steps to reproduce:

$ git -C ~/src/bash-preexec describe --tags
0.3.6
$ tmux -V
tmux 2.6
$ tmux
tmux $ foo() { echo "$@" >> preexec.out; }
tmux $ preexec_functions+=(foo)
tmux $ echo 123
<CTRL + D>
$ cat preexec.out
echo 123
echo 123

If you tail -f preexec.out while performing these steps, you see that the second echo 123 does indeed come from the <CTRL + D>.

@rcaloras
Copy link
Owner

rcaloras commented Nov 4, 2018

@JeffreyFalgout thanks for reporting! Believe this is the same issue as #27. What do you think? Any ideas for how to address?

@JeffFaer
Copy link
Author

JeffFaer commented Nov 4, 2018

Yep, sounds like a dupe.

@JeffFaer
Copy link
Author

JeffFaer commented Nov 4, 2018

Duplicate of #27

@JeffFaer JeffFaer closed this as completed Nov 4, 2018
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