bug-bash
[Top][All Lists]
Advanced

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

bash completion of an option with a space in it, isn't double quoted


From: d3fault
Subject: bash completion of an option with a space in it, isn't double quoted
Date: Tue, 26 Mar 2019 00:43:18 -0700

From: d3fault
To: bug-bash@gnu.org,bash@packages.debian.org
Subject: bash completion of an option with a space in it, isn't double quoted

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR$
uname output: Linux debianD4faultHostname 4.9.0-8-amd64 #1 SMP Debian
4.9.144-3.1 (2019-02-19) x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 4.4
Patch Level: 12
Release Status: release

Description:
        In the following example it auto-completes without putting double
quotes around "hi mom", which means a process would see it as 2
separate args instead of 1.
        $ complete -W "hi\ mom foo bar" ls
        $ ls h<tab>
        
        which results in the erroneous completion (no double quotes):
        $ ls hi mom

        For a semi-related discussion which led me to discover this bug:
        https://bugreports.qt.io/browse/QTBUG-74692
        and
        https://bugreports.qt.io/browse/QTBUG-74594

Repeat-By:
        See above.

Fix:
        After you press tab your pending command should look like this:
        $ ls "hi mom"



reply via email to

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