diff --git a/z.sh b/z.sh index b254c5e..9517f05 100644 --- a/z.sh +++ b/z.sh @@ -82,7 +82,7 @@ _z() { fi # tab completion - elif [ "$1" = "--complete" ]; then + elif [ "$1" = "--complete" -a -s "$datafile" ]; then while read line; do [ -d "${line%%\|*}" ] && echo $line done < "$datafile" | awk -v q="$2" -F"|" '