mirror of
https://github.com/zoriya/flake.git
synced 2025-12-06 06:36:19 +00:00
Automatically start nvim on tmux new session
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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 =
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user