Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bug: suffix alias and tabcompletion
- X-seq: zsh-workers 38739
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: bug: suffix alias and tabcompletion
- Date: Tue, 21 Jun 2016 13:18:21 -0700
- Cc: Michael Gebhard <michael.gebhard@xxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=LRgmh2x3YIfyc/ifDEl6Lwo/A8W/9yKZEsaUGxsFuZQ=; b=ySLGhIXrg+b9UmAyTkyZpg2ZZbR8AK4WZJyP17++vsc+ADJAkqELcr8OhYkTJ2xsV/ fWoUouriG6ppGeyD3g3r/QUkVlobL7oqOTrZkxC5Av3HkVoPe7ucQ/jXds70WSo26kDP 9W4BdU6Wouv+fRi35iy57i4xJg8nxOcBYBeFS5zSu9iQ94YH51e53WuFzSLjpem/1Itx pPNwva0++xXFg8Kr8AduggKEEBCSy7OWnQKEF3//RXwiUu9FqAcDLWUiI7ieZIsJTtee gnYB4apOKMD9fG6KXJyh3uLGXPIwYdxAJDe7/tU8z8QOHG7CmDwh3PGQRmNi5ZTTFHhY y/8w==
- In-reply-to: <20160621193918.GA3768@fau.de>
- 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: <20160621193918.GA3768@fau.de>
On Tue, Jun 21, 2016 at 12:39 PM, Michael Gebhard
<michael.gebhard@xxxxxx> wrote:
>
> running the following commands and trying to complete the last line
> by pressing tab produces a zsh taking up 100% cpu.
>
> zsh -f
> touch foo.bar
> alias -s bar='echo a &'
It's not (just) completion; attempting to run the command "foo.bar"
produces a similar infinite loop. The alias has expanded to "echo a &
foo.bar" which then recursively expands "foo.bar" (because after the
"&" it is in command position again) and off we go. The "touch
foo.bar" isn't required.
Normal aliases have a safeguard against the alias calling itself
recursively, but that must have been overlooked with suffix aliases.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author