浏览代码

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.
Marc Cornellà 9 年之前
父节点
当前提交
fea74b4b34
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      lib/functions.zsh

+ 5 - 3
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
 }
 
 #