Add set_default_path option

This option lets user disable 'tmux set-option default-path' for
$session_root, like this:
	session_root "~/x/y/z"
	set_default_path=false
This commit is contained in:
Stanislav Fomichev
2013-06-18 11:10:48 +04:00
parent c1ecc0a7c8
commit 8c2582a948

View File

@@ -138,6 +138,7 @@ load_session() {
local file="$TMUXIFIER_LAYOUT_PATH/$1.session.sh"
if [ -f "$file" ]; then
session="$1"
set_default_path=true
source "$file"
session=
@@ -178,7 +179,8 @@ initialize_session() {
# Set default-path for session
if [ -n "$session_root" ] && [ -d "$session_root" ]; then
cd "$session_root"
tmux set-option -t "$session:" default-path "$session_root" 1>/dev/null
$set_default_path && tmux set-option -t "$session:" default-path "$session_root" 1>/dev/null
fi
# In order to ensure only specified windows are created, we move the