Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

tab completion when .z exists #136

Closed
wants to merge 1 commit into from

2 participants

@juanpabloaj

solve:
If the file .z don't exists and I try tab completion I get this error :

rm $HOME/.z
z sr<TAB>
z sr-bash: /home/user/.z: No such file or directory
@juanpabloaj juanpabloaj changed the title from tab completion when .z exists to tab completion when don't .z exists
@juanpabloaj juanpabloaj changed the title from tab completion when don't .z exists to tab completion when .z don't exists
@juanpabloaj juanpabloaj changed the title from tab completion when .z don't exists to tab completion when .z exists
@rupa rupa closed this in 56027bf
@rupa
Owner

Thanks. I pushed a fix, just did it a bit differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 26, 2014
  1. @juanpabloaj
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  z.sh
View
2  z.sh
@@ -82,7 +82,7 @@ _z() {
fi
# tab completion
- elif [ "$1" = "--complete" ]; then
+ elif [ "$1" = "--complete" ] && [ -e $datafile ]; then
while read line; do
[ -d "${line%%\|*}" ] && echo $line
done < "$datafile" | awk -v q="$2" -F"|" '
Something went wrong with that request. Please try again.