[Top][All Lists]

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

leading equal-sign stripped when doing programmable completion

From: Fake address to foil spammers
Subject: leading equal-sign stripped when doing programmable completion
Date: Tue, 4 Jan 2005 19:11:04 +0000

Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/local/bash-3.0/share/locale' 
-DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H  -I.  -I. -I./include -I./lib   -g -O2
uname output: Linux gilead 2.4.18-686 #1 Sun Apr 14 11:32:47 EST 2002 i686 
Machine Type: i686-pc-linux-gnu

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


        When I define a function to perform completion, Bash appears
        to strip leading equals-signs from command arguments before
        passing them to my function.


        First of all, I give the following `complete' command:

                complete -F print_args echo

        Then I define the following function:
                print_args() {
                        echo "Argument 1: $1"
                        echo "Argument 2: $2"
                        echo "Argument 3: $3"

        Now, I type the following (so the cursor is directly
        after the `b') and then press Tab:

                echo =a =b
        `print_args' is invoked and prints the following:
                Argument 1: echo
                Argument 2: b
                Argument 3: =a

        Bash appears to have stripped the leading equals-sign off "=a" before
        passing it to `print_args'.  This looks like a definite bug.

reply via email to

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