diff options
author | Marc Cornellà <marc.cornella@live.com> | 2015-11-29 19:31:26 +0100 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2015-11-29 19:34:10 +0100 |
commit | fea74b4b34412cca1b0bc3ec232e5ec8c602ee8a (patch) | |
tree | b024b5ffad264acd04ec3c0142dfc4b35f22948f /lib/functions.zsh | |
parent | ef031dfe8fdf0e8e02839ef3be195583b24017d9 (diff) | |
download | zsh-fea74b4b34412cca1b0bc3ec232e5ec8c602ee8a.tar.gz zsh-fea74b4b34412cca1b0bc3ec232e5ec8c602ee8a.tar.bz2 zsh-fea74b4b34412cca1b0bc3ec232e5ec8c602ee8a.zip |
Fix open_command nohup call
There a syntax error if $cmd_var contains more than one word,
so we drop the current way to prepend nohup and use a simpler
if-else form.
Diffstat (limited to 'lib/functions.zsh')
-rw-r--r-- | lib/functions.zsh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/functions.zsh b/lib/functions.zsh index 8ef3420bb..ec6f37214 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -29,9 +29,11 @@ function open_command() { esac # don't use nohup on OSX - [[ "$OSTYPE" != darwin* ]] && open_cmd="nohup $open_cmd" - - $open_cmd "$@" &>/dev/null + if [[ "$OSTYPE" == darwin* ]]; then + $open_cmd "$@" &>/dev/null + else + nohup $open_cmd "$@" &>/dev/null + fi } # |