Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug? piping ls to anonymous function changes subsequent behaviour of ls
- X-seq: zsh-users 26093
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: vapnik spaknik <vapniks@xxxxxxxxx>
- Subject: Re: Bug? piping ls to anonymous function changes subsequent behaviour of ls
- Date: Sun, 27 Sep 2020 19:36:04 -0700
- Archived-at: <https://zsh.org/users/26093>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-users/2020-09/CAH%2Bw%3D7aTtJtD8qDvg2MNQZDD4%3D_4xcGJBTnf2Gpt_Om36Qe84g%40mail.gmail.com>
- Authentication-results: zsh.org; iprev=pass (mail-ot1-f53.google.com) smtp.remote-ip=209.85.210.53; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=h+vsdS/tqxMI68FtSzBpCP9AKa8N70ynY43vImLQVDk=; b=AqqS+Hcp85a69f96eJ8bW79LTN9CMpH9EmprLw6dydujjrBJnXRV3SosURWYYdzpi/ EmQ5jzhZHfMG8Henp24FdUQwUn7pfpZgeTO0zLlzprLdQrJWuiWGajoLkUO+rndc1aRo HkGkOquWAVj+aqzqElMJX3uDnIDlMvOwkFHPiUDR1sWc3BYDjqltGLS0Z8jhF19HGYQQ IYK3G8uv7s0CYIfYrw6He0u6vFHfB3tDYKHRAMYywD7hj+Uj1gHg7SrmRglMY+XDvR9A 8a6H8bHrq11oojXhXuTxYUGpPmgQ3USZwBzR6oDvAIQbjmTMyxB/Ed99Hp4Sj9AeLcLq UpQA==
- In-reply-to: <1678353929.1101107.1601254926037@mail.yahoo.com>
- List-archive: <http://www.zsh.org/sympa/arc/zsh-users>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-users.zsh.org>
- List-owner: <mailto:zsh-users-request@zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-users>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-users>
- References: <1846474183.1100394.1601253063804.ref@mail.yahoo.com> <1846474183.1100394.1601253063804@mail.yahoo.com> <CAH+w=7a2sPR8mecmaV8YuotyUJ9Ma90NxyyPrsL+SH6xJyC0yw@mail.gmail.com> <1678353929.1101107.1601254926037@mail.yahoo.com>
- Sender: zsh-users-request@xxxxxxx
On Sun, Sep 27, 2020 at 6:02 PM vapnik spaknik <vapniks@xxxxxxxxx> wrote:
>
> From a new shell:
> > which -a ls
> ls: aliased to ls --color=auto
> /bin/ls
> > /bin/ls | () {echo foo}
> foo
> > /bin/ls
> foo
> > which /bin/ls
> /bin/ls () {
> echo foo
> }
Something else funny is happening here. This is defining /bin/ls as a
function with body "echo foo", as if the "|" were not present in the
command at all.
Try using "set -x" (or "setopt xtrace" if you prefer) before the first
attempt to pipe.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author