30 Nov
2008
30 Nov
'08
21:51
On Sunday 30 November 2008 21:07:51 David C. Rankin wrote:
alias wp='if [[ $1 ]]; then webpin $1; else echo -e "\n\tusage: wp <filename>\n"; fi'
I don't think you can actually pass parameters to aliases. Your previous alias worked because wp expanded to "webpin $1" and $1 evaluated to the blank string You want to use a shell function instead. Something like function wp() { if [ -n "$1" ]; then webpin $1; else echo -e "\nbad usage\n"; fi } Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org