Skip to content

Commit

Permalink
Load default configurations. This closes jamesottaway#5
Browse files Browse the repository at this point in the history
Tmux-up tries to load a default configuration from ~/.tmux now, if the
specified file doesn't exist in the current directory.
  • Loading branch information
poxar committed Mar 17, 2015
1 parent b504aa7 commit 665cd8f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tmux-up
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@ then
exit 0
fi

CONF_DIR=${TMUXUP_CONF_DIR:-$HOME/.tmux}
CONF=${1:-.tmux.conf}

# try default configuration directory
[ ! -f "$CONF" ] && CONF="$CONF_DIR/$CONF"

if [ ! -f "$CONF" ]
then
echo "$0: cannot stat ‘${CONF}’: No such file"
Expand Down

0 comments on commit 665cd8f

Please sign in to comment.