On 2/26/26 10:48 AM, &&&&&&&&&& wrote:

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

Description:
suppose we are currently in a certain dir that contains a directory called
"vim". Assuming that vim editor is installed and there other commands that
can
     be executed that start with the letter 'v', then typing 'v' and
pressing tab for bash completion displays a forward slash at the end of the
suggestion as follows "vim/"

Repeat-By:
     Assuming the assumptions mentioned in the Description are satisfied,
then to reproduce
     1. mkdir vim
     2. type 'v'
     3. press tab till completion suggestions appear

It's ambiguous.  Both a binary in $PATH and a directory in the current
directory can be valid completions, since bash completion (and readline)
allows you to build a relative pathname by completing a directory at a
time.

Because it's ambiguous, the name exists as a directory in the current
directory, and you have the `mark-directories' readline variable set,
readline appends the slash.

Chet

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

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to