bash的alias(別名)不直接支持$1,$2,$3,這樣的命令行參數.
所以我們可以在/etc/bashrc中, 使用函數來替代.
(但是我不知道爲什麼貌似alias temp='echo $1', 這樣會把對temp的參數打印出來, 需要進一步確認...)
Anyway, 比如像下面這樣, 可以滿足我的需求
ils() { find . -maxdepth 1 -iname \*$1\* } rls() { ls -al *$1* }
BASH : Alias and Parameters
http://chinmaykamat.wordpress.com/2009/09/16/bash-alias-and-parameters/
Make bash alias that takes parameter?
http://stackoverflow.com/questions/7131670/make-bash-alias-that-takes-parameter
Pass Command Line Arguments To a Bash Alias Command
http://www.cyberciti.biz/faq/linux-unix-pass-argument-to-alias-command/
Alias, Setting command aliases
http://www.linuxhowtos.org/Tips%20and%20Tricks/command_aliases.htm