[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

$2 in complete function doesn't like ':' character

From: ives
Subject: $2 in complete function doesn't like ':' character
Date: Thu, 20 Sep 2001 13:36:43 +0200 (MEST)

Configuration Information [Automatically generated, do not change]:
Machine: sparc
OS: solaris2.8
Compiler: cc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc' 
-DCONF_OSTYPE='solaris2.8' -DCONF_MACHTYPE='sparc-sun-solaris2.8' 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I.  -I. -I./include -I./lib 
-I//include -g
uname output: SunOS snakeroot.sonytel.be 5.8 Generic_108528-03 sun4u sparc 
Machine Type: sparc-sun-solaris2.8

Bash Version: 2.04
Patch Level: 0
Release Status: release

        According to the documentation, the second arg ($2) passed to
        a completion function should contain the word being completed
        and the third arg ($3) the word preceding the word being

        However, if the word being completed contains a ':' character,
        only the part after the ':' is passed as $2 to the completion

        > function _blah_complete() { echo -e "\n-$1-$2-$3-"; }
        > complete -F _blah_complete blah
        > blah arg1 arg2 arg3:and:more<TAB>

        Expected result:

        or even (if the ':' splits "arg3:and:more" in three words):

reply via email to

[Prev in Thread] Current Thread [Next in Thread]