1d2c1e8ab80922fb673a08440a8e2b33b9231de1

Author
Pete "Peteches" McCabe <peteches@petemccabe.gb.net>
Committer
Pete "Peteches" McCabe <peteches@petemccabe.gb.net>
Date

Message

Fixed output issues webith websearch plugin.

- if user has rm set as an alias to 'rm -i' user is prompted to whether to
  remove the nohup.out file.

 $ ddg fools
	nohup: ignoring input and appending output to ‘nohup.out’
	rm: remove regular empty file ‘nohup.out’?

- if output redirected to a file nohup will not create nohup.out and rm is
  unecessary.

Diff

 1diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh
 2index 371e3a303189793797c1a65e404f28d2c76ae14d..28559deb9d084895371a348ee89585be703b0b33 100644
 3--- a/plugins/web-search/web-search.plugin.zsh
 4+++ b/plugins/web-search/web-search.plugin.zsh
 5@@ -37,8 +37,7 @@ function web_search() {
 6   done
 7 
 8   url="${url%?}" # remove the last '+'
 9-  nohup $open_cmd "$url" 
10- 	rm nohup.out	
11+  nohup $open_cmd "$url" >/dev/null 2&>1
12 }
13 
14