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

why is the - modifier useful



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




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