bug-bash
[Top][All Lists]
Advanced

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

filename TAB completion breaks using "force write" redirection syntax


From: idallen
Subject: filename TAB completion breaks using "force write" redirection syntax
Date: Tue, 16 Jun 2015 10:20:35 -0400 (EDT)

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='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H   -I.  -I../. -I.././include -I.././lib  -D_FORTIFY_SOURCE=2 -g 
-O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall
uname output: Linux idallen-oak 3.19.0-20-generic #20-Ubuntu SMP Fri May 29 
10:10:47 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 4.3
Patch Level: 30
Release Status: release

Description:
    I don't know if this bug applies to bash or to bash-completion.
    Reference: "man bash" section "Redirecting Output"

    Filename TAB completion breaks using "force write" redirection syntax.

    The use of the "pipe" symbol after the ">" makes the completion think that 
a command name is required instead of a file name.

Repeat-By:
    $ cd /tmp
    $ touch foobar
    $ set -o noclobber
    $ date > foo<TAB>
             foobar     # this is expanded correctly to the file name
    bash: foobar: cannot overwrite existing file     # this is correct

    $ date >| foo<TAB>  # using overwrite syntax triggers command name expansion
    foo2hbpl2           foo2lava-wrapper    foo2xqx
    foo2hbpl2-wrapper   foo2oak             foo2xqx-wrapper
    foo2hiperc          foo2oak-wrapper     foo2zjs
    foo2hiperc-wrapper  foo2qpdl            foo2zjs-icc2ps@
    foo2hp              foo2qpdl-wrapper    foo2zjs-pstops
    foo2hp2600-wrapper  foo2slx             foo2zjs-wrapper
    foo2lava            foo2slx-wrapper     foomatic-rip@

    The pathnames matched by ">" and ">|" should be identical.



reply via email to

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