Creating an alias (name=value pair) where the name has spaces.
Hi,
Can an alias (in the .bashrc file) has one or more spaces in the name part of the name=value pair? For example, alias ls -l="ls -lh" If yes, how? Thanks and regards. |
I dont think what you asked can be done
however for what you intend in the example you can do a alias ls=`ls -h` ls -l would now be equal to ls -lh another way of doing things is functions for example for ex unalias ls function ls() { if [ "$#" -gt 0 -a "$1" = "-l" ]; then /bin/ls -h $* else /bin/ls $* fi } or something like that |
Thanks zeropash.
|
All times are GMT -5. The time now is 10:14 AM. |