Your message dated Wed, 29 Jul 2015 20:59:28 +0200
with message-id <[email protected]>
and subject line bash correctly expands aliases, closing bug
has caused the Debian Bug report #702875,
regarding alias for grep breaks "grep bash"
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
702875: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702875
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: bash
Version: 4.1-3

If I run

        alias grep="grep "
        echo bash | grep bash

then grep doesn't show "bash".

        echo xxxx | grep xxxx

works.

Please note the space in the alias. The real
life code was

        # uncomment to enable color
        # color="--color=auto"
        alias grep="grep $color"

Platform is Squeeze on amd64.


Regards
Harri

--- End Message ---
--- Begin Message ---
alias grep="grep $COLOR" and similar constructs are broken, searching
for "alias ex" in bash's manpage explains this feature, i.e., bash did
nothing wrong here, even though this feature is quite counter intuitive.

Expanding aliases after aliases is useful for example to enable
prepending nohup to aliases, therefore Korn shells do
alias nohup='nohup ' by default

If such an alias was in a .bashrc provided in Debian, this was fixed
long ago, hence closing.

--- End Message ---

Reply via email to