Hi, can any zsh users' tell me what is wrong with the following
function:
---------------------------------------------------------------------------
function del() {
if (($# == 0)) {
echo "usage: del [filename]..."
} elif (($# == 1)) {
echo hahaaha
} else {
echo foobar....
mv $* /.trash
}
---------------------------------------------------------------------------Quote:}
According to the man page, the syntax of the conditional statements is
correct. so what is wrong here ? is it w/ the function ?
here is the error I got: Also, another problem :-) function chpwd () { print -Pn '^[]2;%~^G' } does not change my xterm title bar to display my PROMPT, could somebody Thanks a lots --
---------------------------------------------------------------------------
root / [39] . .zsh_aliases [7:07am]
.zsh_aliases: parse error near `)' [50]
hahaaha
.zsh_aliases: parse error near `}' [52]
foobar....
Usage: mv [options] source dest
mv [options] source... directory
Options:
[-bfiuv] [-S backup-suffix] [-V {numbered,existing,simple}]
[--backup] [--force] [--interactive] [--update] [--verbose]
[--suffix=backup-suffix] [--version-control={numbered,existing,simple}]
.zsh_aliases: parse error near `}' [55]
.zsh_aliases: parse error near `}' [56]
---------------------------------------------------------------------------
please help ..
- UNIX Users: try this and cry :-)
- kill -9 `ps auxw | grep "\`whoami\`" | awk '{print $2}'`
- MS-DOS / MS-WINDOWS User: you have to reboot your machine !!!