X-Git-Url: https://git.treefish.org/fex.git/blobdiff_plain/7fa382617fbaccc0ce522b2b3adbbee9db5ad227..20150826:/bin/zz diff --git a/bin/zz b/bin/zz index 48a5a9f..8195b87 100755 --- a/bin/zz +++ b/bin/zz @@ -7,7 +7,7 @@ ZZ=${ZZ:-$HOME/.zz} -if [ "X$*" = X-h -o "X$*" = X--help ]; then +if [ "$*" = -h -o "$*" = --help ]; then exec cat<<EOD zz is the generic clip board program. See also the edit helper program ezz. The clip board is \$ZZ (default: \$HOME/.zz). Options and modes are: @@ -35,15 +35,15 @@ Limitation: zz does not work across different accounts or hosts! Use xx instead. EOD fi -if [ x"$1"x = x+x ]; then +if [ "$1" = + ]; then shift exec cat -- "$@" >>$ZZ fi if [ -t 0 ]; then - if [ x"$1"x = xx ]; then + if [ -z "$1" ]; then exec cat -- $ZZ - elif [ x"$1"x = x..x ]; then + elif [ "$1" = .. ]; then exec cat -- $ZZ~ else test -f $ZZ && mv $ZZ $ZZ~