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

Re: sh compatibility again :->



On Sun, 11 Aug 1996, Bart Schaefer wrote:

> 
> } > But the following things could probably be fixed 
> } > 
> } > 4. Traditional /bin/sh interprets `set -' as set +xv.
> } 
> } OK.  I've changed that.  set - will be the same as set +xv and
> } set - args will be the same as set +xv -- args.
> 
> Hmm.  So what's the approved way of setting $1 to "-x"?  `set -- -x`?
> And is `set --` equivalent to `shift $#`, since `set -` is not?
> 
> Are you sure `set - args` should act like `set +xv -- args`?
> 

Well, /bin/sh behaves execatly this way.

> I can't say I'm entirely excited about this change.
> 

It is lonely `set -' which have this effect. Just the same, as lonely `set
+' does *not* sets $1 to + but rather outputs all parameter names. If I
try `set + foo', it sets $1 to `foo'. So `set -' could just follow the
suit.

Greetings

-------------------------------------------------------------------------
Andrej Borsenkow 		Fax:   +7 (095) 252 01 05
SNI ITS Moscow			Tel:   +7 (095) 252 13 88

NERV:  borsenkow.msk		E-Mail: borsenkow.msk@xxxxxx
-------------------------------------------------------------------------




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