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

cleaned the code

This commit is contained in:
Simon Marache-Francisco 2009-03-30 13:40:48 +02:00
parent 0abbcabe89
commit 904fc8b744

12
_j
View File

@ -4,14 +4,8 @@ cur=${words[2, -1]}
ret=$(autojump --completion "${cur[*]}") ret=$(autojump --completion "${cur[*]}")
#echo "complete on " ${cur[*]}
if [ "$ret" != "" ]; then # if at least one answer if [ "$ret" != "" ]; then # if at least one answer
#if [ $( echo "$ret" | wc -l ) -eq 1 ]; then # Only one answer for i in $(echo "$ret"); do
# echo $ret compadd -U $i # add all of them as possible completion
#else # several answers done
for i in $(echo "$ret"); do
compadd -U $i
done
#fi
fi fi