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

Re: Enhanced shell



On Jul 29, 11:07pm, Peter Stephenson wrote:
} Subject: Re: Enhanced shell
}
} Zefram wrote:
} > Peter Stephenson wrote:
} > >emulate builtin
} > 
} > We should only standardise "emulate posix_v2" as a way of specifying
} > "this is written for the enhanced shell standard".  Then future
} > revisions of the standard get to add new permitted arguments to emulate.
} > Without an emulate command in a script, the shell has to behave in a
} > manner compatible with the original POSIX.
} 
} Hmm.  Zsh obviously doesn't, you have to trick it some other way.

I should think that "has to behave in manner compatible with POSIX" would
apply only if the shell actually advertised itself under a standardized
name, e.g., "sh".

Should there be a standardized command-line option that is equivalent to
`emulate posix_v2'?  The only one available seems to be -z ... I don't
know if that already has a meaning in ksh; it doesn't yet in bash2.
 
} > >? =cmd?
} > 
} > With cleaned-up semantics, yes.  It shouldn't be doing alias expansion.
} 
} Yes, I'm not sure how long that's been there, and I don't think it's all
} that useful

It is, occasionally, extremely annoying, as one can't do [[ -x =cmd ]]
without getting syntax errors when cmd happens to be an alias.  On the
other hand, if cmd actually isn't found, that's an abortive error too.

Anyway, it appears to have gone in in late 2.4.xxx or sometime in 2.5, as
it is not in the version 2.4 sources I have and it's not mentioned in the
ChangeLog.3.0 file anywhere.  2.5 always was the mutant zsh from outer
space (no offense to those who worked on it; they meant well).

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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