Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Aliasing assignment-ish words (aliases[x=y]=z)
- X-seq: zsh-workers 37572
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Aliasing assignment-ish words (aliases[x=y]=z)
- Date: Mon, 11 Jan 2016 23:44:29 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=qNzEoCEKW2eoIyGl/g5hPM+MScuR1lDzgJS9X7zS4Y8=; b=wsSKXVQE/3rAjda1yQAJ5RDTv/7fWabiKtzcOeiglku7BgFcNY6SwJRtLk+sEVDS15 Pdo10+e5Cc9aoUazRhG7yYs3CF3JOvdNUps0sAtcbgZOmNaIbBDl7aYcK/Cd59q92F8P AVecQkBvkkUW1FlHc0OIGzpooQLu2wJe1FyUvHYuVmFK3XVZs4EDSoDYW1sxTyIeNmSB EW2Z7Gx6/ItqvY8QGEASaY1ubf8NvR4DXRzanIy5zNJ/hdqxajXs0XgTn2atnkVaQS62 FLR7UOl8ZeTORiAfIpxtVI8vWFB8PMfxosYb5ehFzrXesAhriiMNF6dT7+zCKH6OnoSw /wIA==
- In-reply-to: <20160110195030.GB1997@tarsus.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20160110003757.GA18461@tarsus.local2> <160110111943.ZM864@torch.brasslantern.com> <20160110195030.GB1997@tarsus.local2>
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