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

Re: Aliasing assignment-ish words (aliases[x=y]=z)



On Jan 10,  7:50pm, Daniel Shahaf wrote:
}
} I thought we might want to have 'alias -L' handle LHSes with '=' in them
} specially: omit them from the output with a warning, or maybe fail hard

Yeah, that probably wouldn't be too difficult (I'd go with the warning).

} For what it's worth, the real-world use-case behind this thread is
} a z-sy-h user whose zshrc has an alias "aliases[=]='noglob ='" and
} a function literally named '='.  (That alias works as expected, as
} does "aliases[=ls]='...'" even if EQUALS is set.)

Hm, it also ought to be possible to special case a word starting with
'=' (since it's not possible to alias the empty string to anything).

I find this interesting:

    torch% alias '==foo'
    zsh: bad assignment

"Bad assignment"?



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