浏览代码

open_command: simplify code

Marc Cornellà 6 年之前
父节点
当前提交
12086593a4
共有 1 个文件被更改,包括 2 次插入5 次删除
  1. 2 5
      lib/functions.zsh

+ 2 - 5
lib/functions.zsh

@@ -16,9 +16,6 @@ function take() {
 }
 
 function open_command() {
-  emulate -L zsh
-  setopt shwordsplit
-
   local open_cmd
 
   # define the open command
@@ -36,9 +33,9 @@ function open_command() {
 
   # don't use nohup on OSX
   if [[ "$OSTYPE" == darwin* ]]; then
-    $open_cmd "$@" &>/dev/null
+    ${=open_cmd} "$@" &>/dev/null
   else
-    nohup $open_cmd "$@" &>/dev/null
+    nohup ${=open_cmd} "$@" &>/dev/null
   fi
 }