bug-bash
[Top][All Lists]
Advanced

[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' 
-DCONF_VENDOR='sun' -DSHELL  -DHAVE_CONFIG_H  -D_LARGEFILE_SOURCE 
-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 
SUNW,Sun-Blade-1000
Machine Type: sparc-sun-solaris2.8

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

Description:
        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
        completed.

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

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

        Expected result:
        -blah-arg3:and:more-arg2-

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



reply via email to

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