-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Command <prefix> e
is not opening .tmux.conf.local
#744
Comments
Hello @Nicholas-Autio-Mitchell, While in a tmux pane, can you execute this command?
Can you also try to set |
Hi @gpakosz , here is the unedited output π ▶ tmux lsk | grep -E 'prefix\s+e\s+'
bind-key -T prefix e new-window -e "EDITOR=emacs -nw --no-splash" -n "#{TMUX_CONF_LOCAL}" sh -c "case \"\\${EDITOR:-vim}\" in *vim) \\${EDITOR:-vim} -c \":set syntax=tmux\" \"\\$TMUX_CONF_LOCAL\";; *) \"\\$EDITOR\" \"\\$TMUX_CONF_LOCAL\";; esac && \"\\$TMUX_PROGRAM\" \\${TMUX_SOCKET:+-S \"\\$TMUX_SOCKET\"} source \"\\$TMUX_CONF\" \\; display \"\\$TMUX_CONF_LOCAL sourced\"" Here is me trying π ▶ echo $EDITOR
emacs -nw --no-splash
π ▶ EDITOR="emacs"
π ▶ echo $EDITOR
emacs
π ▶ tmux lsk | grep -E 'prefix\s+e\s+'
bind-key -T prefix e new-window -e "EDITOR=emacs -nw --no-splash" -n "#{TMUX_CONF_LOCAL}" sh -c "case \"\\${EDITOR:-vim}\" in *vim) \\${EDITOR:-vim} -c \":set syntax=tmux\" \"\\$TMUX_CONF_LOCAL\";; *) \"\\$EDITOR\" \"\\$TMUX_CONF_LOCAL\";; esac && \"\\$TMUX_PROGRAM\" \\${TMUX_SOCKET:+-S \"\\$TMUX_SOCKET\"} source \"\\$TMUX_CONF\" \\; display \"\\$TMUX_CONF_LOCAL sourced\"" Executing |
Ok, realised tmux takes the value of Just trying a few more things to make sure it is the case... |
It seems adding any argument at all the |
I tried wrapping Additionally, I have had As always, thanks for your help @gpakosz ! |
Can you please try setting This implies quitting tmux etc like you noticed above |
The changes to quotes when reading the $EDITOR env var (made in gh-744) do fix the issue. I had an older config on a different machine, where I still used # Works: an old tmux.conf (unknown commit)
bind e new-window -n "#{TMUX_CONF_LOCAL}" sh -c '${EDITOR:-vim} "$TMUX_CONF_LOCAL" && "$TMUX_PROGRAM" ${TMUX_SOCKET:+-S "$TMUX_SOCKET"} source "$TMUX_CONF" \; display "$TMUX_CONF_LOCAL sourced"'
# Fails: current master
bind e new-window -n "#{TMUX_CONF_LOCAL}" -e "EDITOR=$EDITOR" sh -c 'case "${EDITOR:-vim}" in *vim) ${EDITOR:-vim} -c ":set syntax=tmux" "$TMUX_CONF_LOCAL";; *) "$EDITOR" "$TMUX_CONF_LOCAL";; esac && "$TMUX_PROGRAM" ${TMUX_SOCKET:+-S "$TMUX_SOCKET"} source "$TMUX_CONF" \; display "$TMUX_CONF_LOCAL sourced"'
# Works: gh-744
bind e new-window -n "#{TMUX_CONF_LOCAL}" -e EDITOR="$EDITOR" sh -c 'case "${EDITOR:-vim}" in *vim) ${EDITOR:-vim} -c ":set syntax=tmux" "$TMUX_CONF_LOCAL";; *) $EDITOR "$TMUX_CONF_LOCAL";; esac && "$TMUX_PROGRAM" ${TMUX_SOCKET:+-S "$TMUX_SOCKET"} source "$TMUX_CONF" \; display "$TMUX_CONF_LOCAL sourced"' |
Using
<prefix> e
is not opening~/.tmux.conf.local
as usual. The prefix key is working, and all other bindings that I use are working fine. I have the latest commit, and the line in.tmux.conf
the creates thebind e
is there.I found this issue reporting the same problem, and followed similar debug steps there, all info below.
I cannot think of anything else I may've changed to break this. MY bash configs were last touched long before this occured.
Debugging info
EDITOR='emacs -nw --no-splash'
(nw means no window). I can open the file using emacs with this command. `~/.tmux.conf.localRunning
sh -cx '${EDITOR:-vim} ~/.tmux.conf.local && tmux source ~/.tmux.conf && tmux display "~/.tmux.conf sourced"'
works without any issues:In
~/.tmux.conf
replacecfg=$(mktemp) && trap 'rm -f $cfg*' EXIT
withcfg=/tmp/tmux.conf
-- then runcut -c3- ~/.tmux.conf | sh -sx _apply_bindings
.Output of that command:
Contents of
/tmp/tmux.conf.in
:I ran
tmux -vvv
-- looking through the (huge) log files, but could not find anything related to this failure. The only failure was the client failing to connect to the server while it was getting itself set up.Versions
The text was updated successfully, but these errors were encountered: