mirror of
https://github.com/zoriya/flake.git
synced 2026-06-08 04:43:32 +00:00
Run CMD command (for tmux session) before zsh init
This commit is contained in:
@@ -119,6 +119,17 @@
|
||||
}
|
||||
trap __onExit EXIT
|
||||
fi
|
||||
|
||||
# execute arbitrary commands on startup since `zsh -sc` is not a real option :c
|
||||
if [[ -n CMD ]]; then
|
||||
# unset the cmd before executing it (for long processes)
|
||||
cmd=$CMD
|
||||
unset CMD
|
||||
if [[ -n $TMUX ]]; then
|
||||
tmux set-environment -r CMD
|
||||
fi
|
||||
eval $cmd
|
||||
fi
|
||||
'';
|
||||
initExtraBeforeCompInit = builtins.readFile ./comp.zsh;
|
||||
completionInit =
|
||||
|
||||
@@ -158,14 +158,3 @@ 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
|
||||
# unset the cmd before executing it (for long processes)
|
||||
cmd=$CMD
|
||||
unset CMD
|
||||
if [[ -n $TMUX ]]; then
|
||||
tmux set-environment -r CMD
|
||||
fi
|
||||
eval $cmd
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user