[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
customized completion function problem
From: |
Юрий Пухальский |
Subject: |
customized completion function problem |
Date: |
Fri, 11 Jun 2010 15:47:22 +0400 |
I've a customized svn completion implemented like this:
complete -o nospace -F svncomp svn
svncomp()
{
local last dp path=${COMP_WORDS[$COMP_CWORD]}
case $path in
*/) dp="$path";;
*) dp=$(dirname "$path")/; last=$(basename "$path");;
esac
case "$(eval echo $path)" in
svn+ssh://*)
COMPREPLY=( $(compgen -P $dp -C "svn ls $dp" -- "$last" 2>&-) );;
*)
COMPREPLY=( $(compgen -f -- "$path") );;
esac
}
And when i try to complete svn URI, completion command seems to have
problems with gathering the output (probably some sort of timeout,
because only lexicographically first entries are displayed?). In the
following log i just press Tab several times getting different
completion lists.
devfe:~>echo $BASH_VERSION
4.1.0(1)-release
devfe:~>echo $SVN
svn+ssh://svn@svn/SVFE
devfe:~>svn ls $SVN/svfe_
$SVN/svfe_1/ $SVN/svfe_abg/ $SVN/svfe_arf/
$SVN/svfe_2/ $SVN/svfe_aby/
devfe:~>svn ls $SVN/svfe_
$SVN/svfe_1/ $SVN/svfe_2/ $SVN/svfe_abg/
devfe:~>svn ls $SVN/svfe_
$SVN/svfe_1/ $SVN/svfe_2/ $SVN/svfe_abg/ $SVN/svfe_aby/
devfe:~>svn ls $SVN/svfe_
$SVN/svfe_1/ $SVN/svfe_2/ $SVN/svfe_abg/
devfe:~>svn ls $SVN/svfe_
$SVN/svfe_1/ $SVN/svfe_2/ $SVN/svfe_abg/ $SVN/svfe_aby/
devfe:~>svn ls $SVN/svfe_
$SVN/svfe_1/ $SVN/svfe_2/ $SVN/svfe_abg/
devfe:~>svn ls $SVN/svfe_
$SVN/svfe_1/ $SVN/svfe_2/ $SVN/svfe_abg/ $SVN/svfe_aby/
devfe:~>svn ls $SVN/svfe_
$SVN/svfe_1/ $SVN/svfe_2/ $SVN/svfe_abg/
Full list being:
devfe:~/unf0109>svn ls $SVN/
svfe_1/
svfe_2/
svfe_abg/
svfe_aby/
svfe_arf/
svfe_avf/
svfe_baf/
svfe_bcf/
svfe_bkf/
svfe_btf/
svfe_cuf/
svfe_dcf/
svfe_dgf/
svfe_gpb/
svfe_nets/
svfe_ruf/
svfe_sbc/
svfe_shf/
svfe_taf/
svfe_uif/
svfe_uzf/
svfe_vaf/
svfe_vef/
--
«The good thing about standards is there are so many to choose from.»
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- customized completion function problem,
Юрий Пухальский <=