Added zsh trick to disown processes
This commit is contained in:
parent
fb8e5c277a
commit
8c0b488210
@ -4,7 +4,7 @@ Add `nohup` to the current command pressing the `Ctrl + H` shortcut
|
||||
|
||||
### Usage
|
||||
|
||||
* If the command line is `test 1 2 3` it will be transformed to `nohup test 1 2 3 &> test.out` (and vice-versa).
|
||||
* If the command line is `test 1 2 3` it will be transformed to `nohup test 1 2 3 &> test.out &!` (and vice-versa).
|
||||
|
||||
* If the command line is empty, the last command will be recalled.
|
||||
|
||||
|
@ -23,7 +23,7 @@ nohup-command-line() {
|
||||
tokens_space=("${(@s/ /)tokens_slash[-1]}")
|
||||
command=("$tokens_space[1]")
|
||||
|
||||
BUFFER="nohup $BUFFER &> $command.out &"
|
||||
BUFFER="nohup $BUFFER &> $command.out &!"
|
||||
fi
|
||||
}
|
||||
zle -N nohup-command-line
|
||||
|
Loading…
Reference in New Issue
Block a user