From df67df476b7a3682ab11a556f0c00629f33727f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Schaerer?= Date: Mon, 28 Nov 2011 17:12:04 +0100 Subject: [PATCH] prototype of completion for cp and mv --- autojump.bash | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/autojump.bash b/autojump.bash index 62e5c2f..41dcc2f 100644 --- a/autojump.bash +++ b/autojump.bash @@ -29,6 +29,26 @@ EOF } 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 --bash --completion $cur) + while read i + do + #COMPREPLY=("${COMPREPLY[@]}" "${COMP_WORDS[@]:1:$(( ${#COMP_WORDS[@]} - 1 ))}${i}") + COMPREPLY=("${COMPREPLY[@]}" "${i}") + done <