Added zsh trick to disown processes

This commit is contained in:
Michele Renda 2017-05-04 09:03:14 +03:00
parent fb8e5c277a
commit 8c0b488210
2 changed files with 2 additions and 2 deletions

View File

@ -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.

View File

@ -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