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

1
cmd.c
View File

@@ -42,6 +42,7 @@ const struct cmd_entry *cmd_table[] = {
&cmd_down_pane_entry,
&cmd_find_window_entry,
&cmd_has_session_entry,
&cmd_if_shell_entry,
&cmd_kill_pane_entry,
&cmd_kill_server_entry,
&cmd_kill_session_entry,