codex: preserve launcher working directories
This commit is contained in:
@@ -13,7 +13,7 @@ keybinds {
|
|||||||
tmux {
|
tmux {
|
||||||
// Ctrl-b C: start a Codex pane from the current zellij tab.
|
// Ctrl-b C: start a Codex pane from the current zellij tab.
|
||||||
bind "C" {
|
bind "C" {
|
||||||
Run "codex" "--dangerously-bypass-approvals-and-sandbox" {
|
Run "codex" "--dangerously-bypass-approvals-and-sandbox" "--cd" "." {
|
||||||
name "codex"
|
name "codex"
|
||||||
}
|
}
|
||||||
SwitchToMode "Normal"
|
SwitchToMode "Normal"
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ function tmcodex {
|
|||||||
printf '%s\n' "$PWD" >>"$history_file" 2>/dev/null || true
|
printf '%s\n' "$PWD" >>"$history_file" 2>/dev/null || true
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
trw codex --dangerously-bypass-approvals-and-sandbox "$@"
|
trw codex --dangerously-bypass-approvals-and-sandbox --cd "$PWD" "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
tmcodex "$@"
|
tmcodex "$@"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ function zcodex {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ZRW_NAME=codex zrw codex --dangerously-bypass-approvals-and-sandbox "$@"
|
ZRW_NAME=codex zrw codex --dangerously-bypass-approvals-and-sandbox --cd "$PWD" "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
zcodex "$@"
|
zcodex "$@"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Create a new Codex session from the current pane path and switch to it.
|
# Create a new Codex session from the current pane path and switch to it.
|
||||||
# Prefix + C starts a new session without prompting for a name.
|
# Prefix + C starts a new session without prompting for a name.
|
||||||
bind-key C new-session -c '#{pane_current_path}' 'codex --dangerously-bypass-approvals-and-sandbox'
|
bind-key C new-session -c '#{pane_current_path}' 'codex --dangerously-bypass-approvals-and-sandbox --cd "$PWD"'
|
||||||
|
|
||||||
source-file -q /etc/tmux-host-style.conf
|
source-file -q /etc/tmux-host-style.conf
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user