mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-08 04:34:00 +02:00
Fixed problem with multilevel path
This commit is contained in:
parent
606ea84e60
commit
6894c4eb44
1 changed files with 4 additions and 6 deletions
|
|
@ -18,14 +18,12 @@ nohup-command-line() {
|
||||||
BUFFER="${BUFFER#nohup }"
|
BUFFER="${BUFFER#nohup }"
|
||||||
BUFFER="${BUFFER%\ &\>*}"
|
BUFFER="${BUFFER%\ &\>*}"
|
||||||
else
|
else
|
||||||
tokens_slash=("${(@s|/|)BUFFER}")
|
base="${BUFFER#sudo }"
|
||||||
|
tokens_slash=("${(@s|/|)base}")
|
||||||
tokens_space=("${(@s/ /)tokens_slash[-1]}")
|
tokens_space=("${(@s/ /)tokens_slash[-1]}")
|
||||||
i=1
|
command=("$tokens_space[1]")
|
||||||
if [[ $tokens_slash[1] == sudo ]]; then
|
|
||||||
(( i++ ))
|
|
||||||
fi
|
|
||||||
|
|
||||||
BUFFER="nohup $BUFFER &> $tokens_space[$i].out &"
|
BUFFER="nohup $BUFFER &> $command.out &"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
zle -N nohup-command-line
|
zle -N nohup-command-line
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue