bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Incorrect alias substitution


From: Vincent Lefevre
Subject: Re: Incorrect alias substitution
Date: Wed, 25 Feb 2009 03:14:46 +0100
User-agent: Mutt/1.5.19-vl-r26315 (2009-02-20)

On 2009-02-24 19:32:05 -0500, Paul Jarc wrote:
> Vincent Lefevre <address@hidden> 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.

-- 
Vincent Lefèvre <address@hidden> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]