From: Bart Schaefer <schaefer@brasslantern.com>
To: vapnik spaknik <vapniks@yahoo.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: Bug? piping ls to anonymous function changes subsequent behaviour of ls
Date: Sun, 27 Sep 2020 19:36:04 -0700 [thread overview]
Message-ID: <CAH+w=7aTtJtD8qDvg2MNQZDD4=_4xcGJBTnf2Gpt_Om36Qe84g@mail.gmail.com> (raw)
In-Reply-To: <1678353929.1101107.1601254926037@mail.yahoo.com>
On Sun, Sep 27, 2020 at 6:02 PM vapnik spaknik <vapniks@yahoo.com> 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.
next prev parent reply other threads:[~2020-09-28 2:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1846474183.1100394.1601253063804.ref@mail.yahoo.com>
2020-09-28 0:31 ` vapnik spaknik
2020-09-28 0:40 ` Bart Schaefer
2020-09-28 1:02 ` vapnik spaknik
2020-09-28 2:36 ` Bart Schaefer [this message]
2020-09-29 19:06 ` vapnik spaknik
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=7aTtJtD8qDvg2MNQZDD4=_4xcGJBTnf2Gpt_Om36Qe84g@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=vapniks@yahoo.com \
--cc=zsh-users@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).