suppress error from tab completion when datafile not exists

h/t @juanpabloaj. Closes #136
This commit is contained in:
rupa committed 2014-06-27 12:42:47 -04:00
1 parent 24895f3e39
commit 56027bfa61
1 file changed
+1 -1
+1 -1
View File
@@ -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"|" '