[Top][All Lists]

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

conditional aliases are broken

From: Sam Steingold
Subject: conditional aliases are broken
Date: Mon, 15 Aug 2011 11:15:50 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

this works:

$ alias z='echo a'
$ zz(){ z b; }
$ zz
a b

however, after sourcing this file:
if true; then
  alias z='echo a'
  zz(){ z b; }

I get
$ zz
bash: z: command not found
$ type -a z
z is aliased to `echo a'

i.e., somehow zz is defined as function calling z, and z is defined as
an alias, but zz does not know what z is an alias.

Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
http://pmw.org.il http://dhimmi.com http://ffii.org http://palestinefacts.org
http://iris.org.il http://mideasttruth.com http://memri.org
Those who can laugh at themselves will never cease to be amused.

reply via email to

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