[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
programmable auto completion with embedded ":" not working?
From: |
fabien |
Subject: |
programmable auto completion with embedded ":" not working? |
Date: |
Mon, 7 Nov 2005 17:30:34 +0100 |
Configuration Information [Automatically generated, do not change]:
Machine: i486
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
-DHAVE_CONFIG_H -I. -I../bash -I../bash/include -I../bash/lib -g -O2
uname output: Linux briare.cri.ensmp.fr 2.6.12.5 #1 Mon Aug 22 20:07:17 CEST
2005 i686 GNU/Linux
Machine Type: i486-pc-linux-gnu
Bash Version: 3.0
Patch Level: 16
Release Status: release
Description:
when programming an auto-completion with embedded ":" in the
complete names, the auto-completion does not look good.
Repeat-By:
function _xxx()
{
COMPREPLY=( $( compgen -W "x:yyy x:yzz" --
${COMP_WORDS[COMP_CWORD]} ) ) ;
return 0;
}
complete -F _xxx -o default xxx
xxx <TAB>
xxx x:y<TAB AGAIN>
xxx x:x:y
the second auto completion result does not look good. it should have
displayed the list of choices. It seems that the substitution stuff
does not want to go before ":"? It is also possible that I do not
understand something. If a "-" is put instead of ":", it works
properly. Maybe a side effect of url-looking substitutions?
- programmable auto completion with embedded ":" not working?,
fabien <=