1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

Added the new autocompletition file for zsh

This commit is contained in:
Simon Marache-Francisco 2009-03-29 22:17:51 +02:00
parent df3efd5383
commit d7c4f7177e

17
_j Normal file
View File

@ -0,0 +1,17 @@
#compdef j
cur=${words[2, -1]}
ret=$(autojump --completion "${cur[*]}")
#echo "complete on " ${cur[*]}
if [ "$ret" != "" ]; then # if at least one answer
#if [ $( echo "$ret" | wc -l ) -eq 1 ]; then # Only one answer
# echo $ret
#else # several answers
for i in $(echo "$ret"); do
compadd -U $i
done
#fi
fi