mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 01:46:40 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user