Hi,

I set --perl-regexp in GREP_OPTIONS, and this conflicts with the options used 
in contains.fish.  I'm using fish 1.22.1.   The --perl-regexp option is used 
in GNU grep.

I'm new to fish, so my patch may not be optimal.  I tried scoping the 
GREP_OPTIONS variable locally to the contains function, but that didn't 
appear to work.  It also appears necessary to set the value to an empty 
string.


*** /usr/share/fish/functions/contains.fish	2006-11-18 07:52:13.000000000 -0800
--- .config/fish/contains.fish	2006-11-24 19:18:07.000000000 -0800
***************
*** 35,42 ****
--- 35,45 ----
  	#
  	# Loop through values
  	#
+ 	set -l saved_opts $GREP_OPTIONS
+ 	set GREP_OPTIONS ""
  
  	printf "%s\n" $argv|grep -Fx -- $key >/dev/null
+ 	set GREP_OPTIONS $saved_opts
  	return $status
  end
  
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to