Skip to content

Commit

Permalink
Default FILE to tmux.conf before .tmux.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesottaway committed Aug 8, 2015
1 parent cc3c4cc commit f3b5dd7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tmux-up
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ then
The FILE argument is used to bootstrap the new tmux session if it doesn't
already exist. It must contain tmux-compatible commands, which will be
passed to tmux. Defaults to: .tmux.conf
passed to tmux. Defaults to: tmux.conf OR .tmux.conf
--help display this help and exit
--version output version information and exit
Expand All @@ -41,11 +41,14 @@ fi
if [ -f "$1" ]
then
FILE=$1
elif [ -f 'tmux.conf' ]
then
FILE='tmux.conf'
elif [ -f '.tmux.conf' ]
then
FILE='.tmux.conf'
else
echo "$0: cannot stat ‘${1:-.tmux.conf}’: No such file"
echo "$0: cannot stat ‘${1:-tmux.conf}’: No such file"
exit 1
fi

Expand Down

0 comments on commit f3b5dd7

Please sign in to comment.