mirror of
https://github.com/DictXiong/dotfiles.git
synced 2026-01-29 17:35:42 +08:00
fix(riot): tmux error with window number and spaces
The fix to spaces is just a workaround. Issue may still exist when command contains spaces.
This commit is contained in:
parent
9f1bc8f0fb
commit
f45f7e415c
@ -148,7 +148,7 @@ print_cmd() {
|
||||
|
||||
eval_or_echo() {
|
||||
local DO=""
|
||||
local tmux_win=0
|
||||
tmux_win=${tmux_win:-0}
|
||||
if [[ "$DFS_DRY_RUN" == "1" ]]; then
|
||||
DO=echo
|
||||
fi
|
||||
@ -160,7 +160,7 @@ eval_or_echo() {
|
||||
tmux_win=$((tmux_win+1))
|
||||
$DO tmux new-window -t $TMUX_SESS:$tmux_win -d bash -l
|
||||
fi
|
||||
$DO tmux send-keys -t $TMUX_SESS:$tmux_win "${CMD[@]}" Enter
|
||||
$DO tmux send-keys -t $TMUX_SESS:$tmux_win $(printf '%s Space ' "${CMD[@]}") Enter
|
||||
else
|
||||
$DO "${CMD[@]}"
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user