New command, if-shell (alias if). Executes the tmux command in the second

argument if the shell command in the first succeeds, for example:

       if "[ -e ~/.tmux.conf.alt ]" "source .tmux.conf.alt"

Written by Tiago Cunha, many thanks.
This commit is contained in:
Nicholas Marriott
2009-07-09 15:47:49 +00:00
parent 24e1327d0d
commit 81181bfb72
5 changed files with 189 additions and 1 deletions

View File

@ -22,7 +22,7 @@ SRCS= arg.c attributes.c buffer-poll.c buffer.c cfg.c client-fn.c \
cmd-send-prefix.c cmd-server-info.c cmd-set-buffer.c cmd-set-option.c \
cmd-set-password.c cmd-set-window-option.c cmd-show-buffer.c \
cmd-show-options.c cmd-show-window-options.c cmd-source-file.c \
cmd-split-window.c cmd-start-server.c cmd-string.c \
cmd-split-window.c cmd-start-server.c cmd-string.c cmd-if-shell.c \
cmd-suspend-client.c cmd-swap-pane.c cmd-swap-window.c \
cmd-switch-client.c cmd-unbind-key.c cmd-unlink-window.c \
cmd-up-pane.c cmd.c colour.c grid-view.c grid.c input-keys.c \