[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
the alias remembers that it used to end with a space
From: |
Ilya Beylin |
Subject: |
the alias remembers that it used to end with a space |
Date: |
Thu, 20 Dec 2001 11:54:53 +0100 (MET) |
Configuration Information [Automatically generated, do not change]:
Machine: sparc
OS: solaris2.5.1
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc'
-DCONF_OSTYPE='solaris2.5.1' -DCONF_MACHTYPE='sparc-sun-solaris2.5.1'
-DCONF_VENDOR='sun' -DSHELL -DHAVE_CONFIG_H -DSunOS5 -I. -I. -I./include
-I./lib -I/usr/local/include -g -O2
uname output: SunOS rhea 5.5.1 Generic_103640-27 sun4u sparc SUNW,Ultra-4
Machine Type: sparc-sun-solaris2.5.1
Bash Version: 2.04
Patch Level: 0
Release Status: release
Description:
According to the documentation,
http://www.gnu.org/manual/bash/html_chapter/bashref_5.html#IDX204
If the last character of the alias value is a space or tab character,
then the next command word following the alias is also checked for
alias expansion.
It appears that this property is sticky, that is, if the alias first
is assigned a value that ends on a space, and then another value,
without a space, the secondary expansion continues as before.
The expansion of an alias depends thus on its history, not only on its
current value.
Repeat-By: bash --norc
bash-2.04$ alias foo='echo'
bash-2.04$ foo foo
foo
bash-2.04$ alias foo='echo '
bash-2.04$ alias foo='echo'
bash-2.04$ foo foo
echo
bash-2.04$
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- the alias remembers that it used to end with a space,
Ilya Beylin <=