From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21064 invoked by alias); 21 Jun 2016 20:18:25 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 38739 Received: (qmail 21944 invoked from network); 21 Jun 2016 20:18:24 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) 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.1 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=LRgmh2x3YIfyc/ifDEl6Lwo/A8W/9yKZEsaUGxsFuZQ=; b=MCkIOiYdarLwtVijn5uYt+GLcqvSOTPyN6qxZBmYa7mN/+Rk8wamIFmO03YVS2xsXb a9ZmBTKHnr73kuglgYi7ynu3QUxu03nbfStTW/O0doWj83kdjpH8uVCrzy+iJIFGhgpp hcAvnfIH6+3CbA52uYgEz3L/KvcPR8Zq2r6MAcpnHTk4jsWsxN7/CuI0uSXzL8cUHsIj aLbiU7HDw/fQP0bsQvgHXqT41kQEnoEBVEWBIxQnobHfygEpA8D96d9eogXweQKzY5qi CJAJM70+yYfDQaBPhreEji/bPAZbUnmB3pruupEut8ARnttGMGbVcp4JiQuCBW0IiEzB EXvg== X-Gm-Message-State: ALyK8tKB4zn4NRVle4p5ZvP5T2ydBMmjiF3CmeqFADMt2xBcYwbtrURlItV+RxQhRaZ/9YM+ilkQdvIzKG67dg== MIME-Version: 1.0 X-Received: by 10.25.159.8 with SMTP id i8mr7919447lfe.74.1466540301276; Tue, 21 Jun 2016 13:18:21 -0700 (PDT) In-Reply-To: <20160621193918.GA3768@fau.de> References: <20160621193918.GA3768@fau.de> Date: Tue, 21 Jun 2016 13:18:21 -0700 Message-ID: Subject: Re: bug: suffix alias and tabcompletion From: Bart Schaefer To: Zsh hackers list Cc: Michael Gebhard Content-Type: text/plain; charset=UTF-8 On Tue, Jun 21, 2016 at 12:39 PM, Michael Gebhard 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.