Zsh Mailing List Archive
Messages sorted by:
Re: pushdcycle and pushdignoredups
- X-seq: zsh-workers 2316
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- Subject: Re: pushdcycle and pushdignoredups
- Date: Sun, 3 Nov 1996 00:53:40 -0800
- Cc: zsh-workers@xxxxxxxxxxxxxxx (Zsh hacking and development)
- In-reply-to: Zoltan Hidvegi <hzoli@xxxxxxxxxx> "Re: pushdcycle and pushdignoredups" (Nov 2, 1:56am)
- References: <199611020056.BAA00431@xxxxxxxxxxxxxxxxxxxx>
- Reply-to: schaefer@xxxxxxx
On Nov 2, 1:56am, Zoltan Hidvegi wrote:
} Subject: Re: pushdcycle and pushdignoredups
} Bart wrote:
} > As far as I can tell, the patch already works exactly as it should
} Well, examining it again I confess that there seems to be no problem with
} that patch. But is it really necessary? Isn't Functions/pushd enough for
} those who prefer the old behaviour?
I don't have a strong opinion on that; others can speak up (Peter?). I
note for your consideration that a function solution can't be put under
the control of the "emulate" command for purposes of other functions that
want to use "pushd" in a specific way.
(Aside: Isn't there a bug in Functions/pushd ? It says:
emulate -R zsh
but "emulate -R zsh" will unsetopt localoptions again.)
} Generally I do not like to add a
} feature which can be achieved using existing shell tools. Since this
} particular case adds so little extra code I am convicable that this feature
} may be worth those extra few bytes but where is the border?
One place (though not the only one) where I'd draw a line is at adding a
new builtin. When the existing-tools solution requires that a builtin be
redefined, as in this case, I'm a bit more inclined to add the feature so
that scripts and functions can use it without having to become dependent
on other scripts or functions.
(Aside #2: Does anybody wish there were an equivalent of "localoptions"
that applied to functions and aliases, so that autoloads could blow away
all the possible screwy redefinitions of builtins from their environment,
yet have them magically restored when the function exits?)
Except for the magic ~1 ~2 etc. syntax, the entire functionality of the
directory stack and pushd/popd/dirs can be achieved with "echo", "cd" and
array assignment. Down that road lies the "rc" shell, but we long ago
turned away from that.
} Also the number of options in zsh is already large enough to frighten an
} average user.
Which is why we changed `setopt` output to hide most of them most of the
Bart Schaefer Brass Lantern Enterprises
Messages sorted by: