diff --git a/dotfiles/config/zellij/config.kdl b/dotfiles/config/zellij/config.kdl index aeb8bd1c..1d75d149 100644 --- a/dotfiles/config/zellij/config.kdl +++ b/dotfiles/config/zellij/config.kdl @@ -13,7 +13,7 @@ keybinds { tmux { // Ctrl-b C: start a Codex pane from the current zellij tab. bind "C" { - Run "codex" "--dangerously-bypass-approvals-and-sandbox" { + Run "codex" "--dangerously-bypass-approvals-and-sandbox" "--cd" "." { name "codex" } SwitchToMode "Normal" diff --git a/dotfiles/lib/functions/tmcodex b/dotfiles/lib/functions/tmcodex index a047ac96..1fe9de1b 100644 --- a/dotfiles/lib/functions/tmcodex +++ b/dotfiles/lib/functions/tmcodex @@ -16,7 +16,7 @@ function tmcodex { printf '%s\n' "$PWD" >>"$history_file" 2>/dev/null || true fi fi - trw codex --dangerously-bypass-approvals-and-sandbox "$@" + trw codex --dangerously-bypass-approvals-and-sandbox --cd "$PWD" "$@" } tmcodex "$@" diff --git a/dotfiles/lib/functions/zcodex b/dotfiles/lib/functions/zcodex index a99143cf..f57913d7 100644 --- a/dotfiles/lib/functions/zcodex +++ b/dotfiles/lib/functions/zcodex @@ -17,7 +17,7 @@ function zcodex { 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 "$@" diff --git a/dotfiles/tmux.conf b/dotfiles/tmux.conf index 32ee14eb..fe914808 100644 --- a/dotfiles/tmux.conf +++ b/dotfiles/tmux.conf @@ -1,6 +1,6 @@ # 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. -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