From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Cc: Michael Gebhard <michael.gebhard@fau.de>
Subject: Re: bug: suffix alias and tabcompletion
Date: Tue, 21 Jun 2016 13:18:21 -0700 [thread overview]
Message-ID: <CAH+w=7YdV_LFUghpueqbjRHWyhzEA8iDarE=FGG1BSk2Fr+s0w@mail.gmail.com> (raw)
In-Reply-To: <20160621193918.GA3768@fau.de>
On Tue, Jun 21, 2016 at 12:39 PM, Michael Gebhard
<michael.gebhard@fau.de> 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.
next prev parent reply other threads:[~2016-06-21 20:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-21 19:39 Michael Gebhard
2016-06-21 20:18 ` Bart Schaefer [this message]
2016-06-22 9:01 ` Peter Stephenson
2016-06-22 11:53 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAH+w=7YdV_LFUghpueqbjRHWyhzEA8iDarE=FGG1BSk2Fr+s0w@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=michael.gebhard@fau.de \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).