Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID
	autolearn=ham autolearn_force=no version=3.4.0
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==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:message-id:date:in-reply-to:comments
         :references:to:subject:mime-version:content-type;
        bh=qNzEoCEKW2eoIyGl/g5hPM+MScuR1lDzgJS9X7zS4Y8=;
        b=k8zrrFtctHP3KRtuD/CgQUGUzb03/EiUjPtqNYBoezox3qo7+CIeRBCbnoYAPwXdHI
         /0fjQ9evo6jT/fqd58wA2KBuHehXzl7hRhTzhl1PHHA49aF7za94essfXIfHDhzhs8X2
         XB8uO+9SHPsQdjnMmgei1BnMQZ16WRq/qdY0D9BhC8y2d0hznKS1C+kQpDINuCoCb8Dv
         f6VkfYEmQ/MXrwwKTe03T/MHyRcDN1lUCPhQGWh0dIvk4w7dmSh83hJd2IZWKwSjQiOI
         YFOFycjHYVXwhA4ncea6KG3fysASiHhjR/4IRy6kpBv4s3HgS59ElCOilpW4Tszk3+4f
         c6zA==
X-Gm-Message-State: ALoCoQl3icPqbxt3z+USu/xd7/DapIwNqsllNkORZWjXHAK2kOJMQKiuTDflWEhakzW5qyoyz4sM86t1lzgVgpot/bdaGdguaw==
X-Received: by 10.66.235.202 with SMTP id uo10mr55951083pac.63.1452584654822;
        Mon, 11 Jan 2016 23:44:14 -0800 (PST)
From: Bart Schaefer <schaefer@brasslantern.com>
Message-Id: <160111234429.ZM6760@torch.brasslantern.com>
Date: Mon, 11 Jan 2016 23:44:29 -0800
In-Reply-To: <20160110195030.GB1997@tarsus.local2>
Comments: In reply to Daniel Shahaf <d.s@daniel.shahaf.name>
        "Re: Aliasing assignment-ish words (aliases[x=y]=z)" (Jan 10,  7:50pm)
References: <20160110003757.GA18461@tarsus.local2> 
	<160110111943.ZM864@torch.brasslantern.com> 
	<20160110195030.GB1997@tarsus.local2>
X-Mailer: OpenZMail Classic (0.9.2 24April2005)
To: zsh-workers@zsh.org
Subject: Re: Aliasing assignment-ish words (aliases[x=y]=z)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Seq: zsh-workers 37572

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"?

