On 3/6/19 7:59 AM, adff wrote:

> Bash Version: 4.2
> Patch Level: 46
> Release Status: release
> 
> Description:
>     The bash [tab] completion as found on redhat RHEL7.6 fails with a
> filename that has the = character. This happens when there are multiple
> matches for the part before the = character.
>     The behavior is correct when there is only one match, or when the
> readline 'complete-filename' is invoqued using "meta /"
> 
> 
> Repeat-By:
>     touch foo=bar
>     touch foobaz
>     #type
>     ls foo=
>     #press [tab] to get completion
>     ls foo=foo\=bar
>     ls: cannot access foo=foo=bar: No such file or directory

This is because the `=' is one of the characters that breaks words for
the readline word completion code.

Bash allows you to change the set of word break characters by changing
the value of the COMP_WORDBREAKS variable.

If you don't want to do that, you can quote the `=' with a backslash to
get one-time completion.

bash-4.2 is pretty old, but when I try to complete after the `=', I
get `foo=foo'. Programmable completion may change the results.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to