浏览代码

Run Web-search as a Background Process with Nohup

Guerki 10 年之前
父节点
当前提交
db3dd6d755
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      plugins/web-search/web-search.plugin.zsh

+ 2 - 3
plugins/web-search/web-search.plugin.zsh

@@ -1,7 +1,6 @@
 # web_search from terminal
 # web_search from terminal
 
 
 function web_search() {
 function web_search() {
-
   # get the open command
   # get the open command
   local open_cmd
   local open_cmd
   if [[ $(uname -s) == 'Darwin' ]]; then
   if [[ $(uname -s) == 'Darwin' ]]; then
@@ -38,8 +37,8 @@ function web_search() {
   done
   done
 
 
   url="${url%?}" # remove the last '+'
   url="${url%?}" # remove the last '+'
-  
-  $open_cmd "$url"
+  nohup $open_cmd "$url" 
+ 	rm nohup.out	
 }
 }