[Top][All Lists]

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

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

From: Chet Ramey
Subject: Re: $2 in complete function doesn't like ':' character
Date: Thu, 20 Sep 2001 09:06:25 -0400

> 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 
> 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.

`:' splits words for the completion code.  The intent was to be able to
complete pathnames in colon-separated lists.  If you quote the colon
with a backslash, you'll get the entire word (with backslashes intact)
passed to your completion function.

``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

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