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

Re: alias -g



On Tue, Aug 3, 2010 at 4:10 PM, Eric Smith <es@xxxxxxxxxxxx> wrote:
> So when I go
> $ echo een vreemde taal T
[...]
> How do I drop the `echo` with alias -g or something similiar
> so all I need to do is go:
> $ een vreemde taal T

Uhh, I think this can be done for example creating a new autocd like
option, but you gonna need to wait for a better zsh user then me to
show you the code.

But, I think that what you like to do come at a highly price. Because
you loose the very definition of valid command. For example you can
forget that 'rm' is a valid command and type

$ rm important thing T

And get 'important' and 'thing' removed. Ok, rm is not a valid world
in a lot of languages, but what about sleep, wait? Or worse 'unlink'
it is a valid world and can remove your files like rm.

This too can be solved, for example, the new autocd-like function can
check if the last arg is T not if the first arg is a valid command,
but I still think that this can be a shoot in the foot some time.

And for me

$ T een vreemde

is more natural than your syntax, because I read it as "translate 'een
vreemde'". I'm prefer postfix for calculators but for this the prefix
notation is more logical for me.

Regards,
Kazuo

-- 
ÂDans la vie, rien n'est à craindre, tout est à comprendreÂ
Marie Sklodowska Curie.



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