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

remove custom app tab completion using autojump in bash

This commit is contained in:
William Ting 2013-12-31 09:20:57 -06:00
parent 4c28a998b4
commit 3709536698
2 changed files with 1 additions and 20 deletions

2
bin/_j
View File

@ -1,4 +1,4 @@
#compdef j # used for zsh tab completion
cur=${words[2, -1]} cur=${words[2, -1]}
autojump --complete ${=cur[*]} | while read i; do autojump --complete ${=cur[*]} | while read i; do

View File

@ -11,25 +11,6 @@ EOF
} }
complete -F _autojump j complete -F _autojump j
_autojump_files() {
if [[ ${COMP_WORDS[COMP_CWORD]} == *__* ]]; then
local cur
#cur=${COMP_WORDS[*]:1}
cur=${COMP_WORDS[COMP_CWORD]}
comps=$(autojump --complete $cur)
while read i
do
COMPREPLY=("${COMPREPLY[@]}" "${i}")
done <<EOF
$comps
EOF
fi
}
if [[ -n ${AUTOJUMP_AUTOCOMPLETE_CMDS} ]]; then
complete -o default -o bashdefault -F _autojump_files ${AUTOJUMP_AUTOCOMPLETE_CMDS}
fi
# set paths if necessary for local installations # set paths if necessary for local installations
if [ -d ~/.autojump/ ]; then if [ -d ~/.autojump/ ]; then
export PATH=~/.autojump/bin:"${PATH}" export PATH=~/.autojump/bin:"${PATH}"