[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Incorrect alias substitution
From: |
Mike Frysinger |
Subject: |
Re: Incorrect alias substitution |
Date: |
Tue, 24 Feb 2009 21:27:20 -0500 |
User-agent: |
KMail/1.11.0 (Linux/2.6.28; KDE/4.2.0; x86_64; ; ) |
On Tuesday 24 February 2009 21:14:46 Vincent Lefevre wrote:
> On 2009-02-24 19:32:05 -0500, Paul Jarc wrote:
> > Vincent Lefevre <vincent@vinc17.org> wrote:
> > > I get the following errors with bash 3.2.39 under Debian/unstable:
> > >
> > > bash -c 'alias a="echo OK >&2"
> > > a
> > >
> > > > /dev/null a'
> > >
> > > bash: line 1: a: command not found
> > > bash: line 2: a: command not found
> >
> > aliases aren't expanded by a non-interactive bash by default. If you
> > do "shopt -s expand_aliases", then they'll be expanded.
>
> I can see that "a" is expanded if I use --posix.
> But "> /dev/null a" is not expanded, while the other shells expand it.
same behavior can be seen when typing things manually in an interactive shell
-mike
signature.asc
Description: This is a digitally signed message part.