fea74b4b34412cca1b0bc3ec232e5ec8c602ee8a

Author
Marc Cornellà <marc.cornella@live.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

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.

Diff

 1diff --git a/lib/functions.zsh b/lib/functions.zsh
 2index 8ef3420bb113b9416f0841d0dd8d05a03fb19ffe..ec6f37214e51f72c0ffc5d7de565549a51431616 100644
 3--- a/lib/functions.zsh
 4+++ b/lib/functions.zsh
 5@@ -29,9 +29,11 @@ function open_command() {
 6   esac
 7 
 8   # don't use nohup on OSX
 9-  [[ "$OSTYPE" != darwin* ]] && open_cmd="nohup $open_cmd"
10-
11-  $open_cmd "$@" &>/dev/null
12+  if [[ "$OSTYPE" == darwin* ]]; then
13+    $open_cmd "$@" &>/dev/null
14+  else
15+    nohup $open_cmd "$@" &>/dev/null
16+  fi
17 }
18 
19 #