1
0
mirror of https://github.com/wting/autojump synced 2024-09-28 14:00:46 +00:00
wting_autojump/_j

12 lines
235 B
Plaintext
Raw Normal View History

#compdef j
cur=${words[2, -1]}
ret=$(autojump --completion "${cur[*]}")
if [ "$ret" != "" ]; then # if at least one answer
2009-03-30 11:40:48 +00:00
for i in $(echo "$ret"); do
compadd -U $i # add all of them as possible completion
done
fi