diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-07-09 18:14:18 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-07-09 18:14:18 +0000 |
commit | eee3dd297e46bb66b392826bde4441ba91c65099 (patch) | |
tree | c99b18ab660ac43ef6b20eda1e991808ddde76a6 /tmux.1 | |
parent | 5afe17d147b9c156d6cf07304a63b881d0094155 (diff) | |
download | rtmux-eee3dd297e46bb66b392826bde4441ba91c65099.tar.gz rtmux-eee3dd297e46bb66b392826bde4441ba91c65099.tar.bz2 rtmux-eee3dd297e46bb66b392826bde4441ba91c65099.zip |
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.
Diffstat (limited to 'tmux.1')
-rw-r--r-- | tmux.1 | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -1,4 +1,4 @@ -.\" $Id: tmux.1,v 1.106 2009-07-08 18:03:03 nicm Exp $ +.\" $Id: tmux.1,v 1.107 2009-07-09 18:14:18 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> .\" @@ -711,6 +711,16 @@ This command only works from inside .D1 (alias: Ic has ) Report an error and exit with 1 if the specified session does not exist. If it does exist, exit with 0. +.It Xo Ic if-shell +.Ar shell-command +.Ar command +.Xc +.D1 (alias: Ic if ) +Execute +.Ar command +if +.Ar shell-command +returns success. .It Xo Ic kill-pane .Op Fl p Ar pane-index .Op Fl t Ar target-window |