why is the - modifier useful

Marc Chantreux <[email protected]>
Newsgroups gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user
Message-ID <aGObvs97RRMAnAQ-@prometheus>
hello people,

I did a demo of autocd and alias -s to coworkers
and concluded I never use the cd command again in interactive
sessions except for history.

"Why?" they said.
"Because I'm used to it ..."

then I realize this custom came for reason: - is already a
builtin which seems really useless to me:

Doc/Zsh/grammar.yo:114:findex(-)
Doc/Zsh/grammar.yo-115-item(tt(-))(
Doc/Zsh/grammar.yo-116-The command is executed with a `tt(-)' prepended to its
Doc/Zsh/grammar.yo-117-tt(argv[0]) string.
Doc/Zsh/grammar.yo-118-)

Back then, I just stayed away from this but time passed and I still don't even
understand why is this useful and *never ever saw this used*. I'm tempted to
use - as a short for 'cd -' (it would be awsome combined with completion).

So I have 2 questions for you guys:

* Is this a stupid move?
* Why the hell this builtin is useful?

regards
Marc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.