Automatically start nvim on tmux new session

This commit is contained in:
2025-01-11 00:31:13 +01:00
parent 655e999094
commit 468b7cf7fc
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ fi
current_session=$(tmux display-message -p "#S")
if ! tmux has-session "-t=$selected_name" 2> /dev/null; then
tmux new-session -ds "$selected_name" -c "$selected" "CMD='nvim .' $SHELL"
tmux new-session -ds "$selected_name" -c "$selected" -e "CMD=$EDITOR ."
fi
tmux switch-client -t "$selected_name"
-6
View File
@@ -108,12 +108,6 @@
}
trap __onExit EXIT
fi
# execute arbitrary commands on startup since `zsh -sc` is not a real option :c
if [[ -n CMD ]]; then
eval $CMD
unset CMD
fi
'';
initExtraBeforeCompInit = builtins.readFile ./comp.zsh;
completionInit =
+6
View File
@@ -163,3 +163,9 @@ proxy() {
# disable space between right prompt and end of line
ZLE_RPROMPT_INDENT=0
# execute arbitrary commands on startup since `zsh -sc` is not a real option :c
if [[ -n CMD ]]; then
eval $CMD
unset CMD
fi