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

Bug in Lib Function #97

Closed
dylancopeland opened this issue Dec 8, 2012 · 1 comment
Closed

Bug in Lib Function #97

dylancopeland opened this issue Dec 8, 2012 · 1 comment
Labels

Comments

@dylancopeland
Copy link
Contributor

Hey there,

There is a bug in get_tmux_cwd() in lib.sh on OS X with tmux 1.7. The line that tries to get the current pane seems to be using the incorrect format specifier, "#D".

local env_name=$(tmux display -p "TMUXPWD_#D" | tr -d %)

In the man-page for tmux(1) it claims that "#D" is the pane unique ID however tmux show-environment doesn't have the ID. I propose that it is changed to use the "#I" and "#S" specifier so the window and pane can string can be constructed. Please see the following output to support this.

$ tmux -V
tmux 1.7
$ tmux display -p "TMUXPWD_#D"
TMUXPWD_%4
$ tmux show-environment
-DISPLAY
-SSH_AGENT_PID
-SSH_ASKPASS
SSH_AUTH_SOCK=/tmp/launch-4qmuFe/Listeners
-SSH_CONNECTION
TMUXPWD_0_0=/Users/dylan
TMUXPWD_1_0=/Users/dylan
TMUXPWD_2_0=/Users/dylan/Projects
TMUXPWD_3_0=/Users/dylan/Projects
-WINDOWID
-XAUTHORITY
$ tmux display -p "TMUXPWD_#I_#S"
TMUXPWD_3_0

Any objections?

@dylancopeland
Copy link
Contributor Author

Wow, didn't realize that the readme was updated with the new PS1 that uses "#D". My bad! 😄

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

No branches or pull requests

1 participant