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:
parent
4c28a998b4
commit
3709536698
2
bin/_j
2
bin/_j
@ -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
|
||||||
|
@ -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}"
|
||||||
|
Loading…
Reference in New Issue
Block a user