a weird bash feature

Tyler Spivey tyler at blindcity.com
Wed Oct 30 15:42:56 EST 2002


all right, in case you didn't know, there is this weird feature of bash:
alias ls='ls -f ' #dont forget the space after the last '
alias test=';touch /tmp/foo-bar'
then:
ls test
and it would touch /tmp/foo-bar. obviously you can do:
alias test='/usr/share/man/man3'
ls test
and it would substitute that. but you need the space after the alias or this
won't work.
i stumbled across it because my distro sets ls up to use color and it kept
running something i didn't want because of the space after the alias,
so just wanted to warn you that this could happen and what to do about it.
if you have anymore to add, send it
to the list.






More information about the Speakup mailing list