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:
parent
df3efd5383
commit
d7c4f7177e
17
_j
Normal file
17
_j
Normal 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
|
Loading…
Reference in New Issue
Block a user