Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: egrep with zsh as /bin/sh - wordsplitting



* Stephane Chazelas <Stephane_Chazelas@xxxxxxxx> [20050114 09:55]:
> On Thu, Jan 13, 2005 at 09:50:18PM +0100, Michael Prokop wrote:

> > I'm maintainer of a Linux Live-CD with zsh as it's default shell.
> > /bin/sh is pointing to /bin/zsh.

> > I've a problem with the scripts egrep and fgrep.
> > That's the original egrep-script:

> > ,---- [ /bin/egrep - original version ]
> > | #!/bin/sh
> > | exec grep -E ${1+"$@"}
> > `----
> [...]

> That's a known issue, and the generally provided work-around is:

> test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}="$@"'

Should I just add this line to /etc/zsh/zshenv?
Because I'd like to fix this issue not just for egrep/fgrep
but in general. ;-)

BTW: Are there any other issues on using zsh as /bin/sh I should
know of?

> See info -f autoconf -n 'Shell Substitutions'

Thanks for the pointer!

> That should be

> #!/bin/sh -

> BTW.

Could you please provide me more information regarding this?

thx && regards,
-mika-
-- 
 ,'"`.         http://www.michael-prokop.at/
(  grml.org -» Linux for texttool-users and sysadmins
 `._,          http://www.grml.org/



Messages sorted by: Reverse Date, Date, Thread, Author