In my .tmux.conf
I have this line:
bind r run "~/bin/tmux_renum"
But it doesn't work (it's supposed to renumber the tab windows - see http://brainscraps.wikia.com/wiki/Renumbering_tmux_Windows). It pops up the yellow status bar '~/bin/tmux_renum' returned 126.
I can't figure out what this means. Anyone seen this before?
I've been sure to exit out of tmux sessions completely, restarting tmux fresh to test.
If it matters, I'm using zsh too.
The tmux command run-shell
(abbreviated to run
in your configuration), passes the string to /bin/sh
†. Unless your script is running and exit
ing with code 126, then it is probably your /bin/sh
that is returning this exit code.
The high-number exit codes (126 and 127) are given by the shell when there is a problem executing the command. Specifically, (per POSIX.1) 126 usually means that the file was not executable.
Try this:
chmod +x ~/bin/tmux_renum
† Technically, it uses whatever _PATH_BSHELL is defined as, but this is almost always /bin/sh
on Unix-like systems.
move-window -r
command and therenumber-windows
session option. The former does a one-time renumbering for a single session (current or specified); the latter automatically maintains a “gapless” sequence of window numbers for the session (any session that has doneset renumber-windows on
, or, withset -g renumber-windows on
, for all sessions have not otherwise overridden the option) - Chris Johnsen 2012-10-13 21:58