tmux: Remove tmux auto naming
This commit is contained in:
@@ -1,18 +1,3 @@
|
|||||||
# Automatically rename new sessions to the basename of the current directory
|
|
||||||
# Only runs once at session creation
|
|
||||||
set-hook -g session-created 'run-shell "
|
|
||||||
base=$(basename \"#{pane_current_path}\")
|
|
||||||
if tmux has-session -t \"$base\" 2>/dev/null; then
|
|
||||||
i=2
|
|
||||||
while tmux has-session -t \"${base}-${i}\" 2>/dev/null; do
|
|
||||||
i=$((i+1))
|
|
||||||
done
|
|
||||||
tmux rename-session -t \"#{session_name}\" \"${base}-${i}\"
|
|
||||||
else
|
|
||||||
tmux rename-session -t \"#{session_name}\" \"$base\"
|
|
||||||
fi
|
|
||||||
"'
|
|
||||||
|
|
||||||
# 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'
|
||||||
|
|||||||
Reference in New Issue
Block a user