# to use zz with vim, write to your .vimrc:
#
-# noremap <silent> zz> :w !zz<CR><CR>
+# noremap <silent> zz> :w !zz<CR><CR>
# noremap <silent> zz< :r !zz<CR>
ZZ=${ZZ:-$HOME/.zz}
(within tin:) |azz
(within vi:) :w !zz
(within vi:) :r !zz
-
+
Limitation: zz does not work across different accounts or hosts! Use xx instead.
EOD
fi
-if [ "$1" = + ]; then
+if [ "$1" = + ]; then
shift
exec cat -- "$@" >>$ZZ
fi
if [ -t 0 ]; then
- if [ -z "$1" ]; then
+ if [ -z "$1" ]; then
exec cat -- $ZZ
- elif [ "$1" = .. ]; then
+ elif [ "$1" = .. ]; then
exec cat -- $ZZ~
- else
+ else
test -f $ZZ && mv $ZZ $ZZ~
exec cat -- "$@" >$ZZ
fi
else
test -f $ZZ && mv $ZZ $ZZ~
exec cat >$ZZ
-fi
+fi