and in the last example he given, i think you don't have to wrap things in quotation marks if alias done like this:
alias lsr='find . -name $1' alias lsr='find . -name $1' lsr() {
find . -name "$1"
}
Wrapping variable expansion with double quotes is a good habit, so spaces are handled properly.Also, if you are using a modern-ish bash, you almost always want to use "$@" when there could be multiple arguments. The double-quoted @ special variable is guaranteed to always expand as multiple args, but with spaces handled correctly:
foo() {
bar --quux=42 "$@"
}
foo "a b c" "Spaces in my filename.txt"