From 8c0b48821086ff3884b6c7d4b9d8a22214cac49c Mon Sep 17 00:00:00 2001 From: Michele Renda Date: Thu, 4 May 2017 09:03:14 +0300 Subject: [PATCH] Added zsh trick to disown processes --- plugins/nohup/README.md | 2 +- plugins/nohup/nohup.plugin.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/nohup/README.md b/plugins/nohup/README.md index c7c37a9e..63fa6344 100644 --- a/plugins/nohup/README.md +++ b/plugins/nohup/README.md @@ -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. diff --git a/plugins/nohup/nohup.plugin.zsh b/plugins/nohup/nohup.plugin.zsh index b723e4c5..05106941 100644 --- a/plugins/nohup/nohup.plugin.zsh +++ b/plugins/nohup/nohup.plugin.zsh @@ -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