mainThe GNU Bourne-Again SHell - Support: sr #110876, completion "cd...

 
 

sr #110876: completion "cd a=<Tab>" works badly

Submitter:  None
Submitted:  Tue 02 May 2023 05:10:50 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Invalid
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 04 May 2023 10:05:07 AM UTC, comment #2: 

"=" can legitimately appear unquoted in bash command, i. e. "cd a=a". And I actually recently worked with directories with "=" in names, and this is why I'm reporting this.

So, please change default definition of COMP_WORDBREAKS: drop all symbols, which can appear unquoted, i. e. "=" and ":"

Askar Safin <safinaskar>
Wed 03 May 2023 02:57:04 PM UTC, comment #1: 

`=' is a character that breaks words for readline, so the word to be completed is actually "". The single possible completion for "" is "a=a", which readline quotes appropriately for subsequent completion.

If you want to complete the directory name, quote the `=' with a backslash.

The readline word break characters appear as the value of the bash COMP_WORDBREAKS variable. You can change them by modifying that variable's value.

Chet Ramey <chet>
Group administrator
Tue 02 May 2023 05:10:50 PM UTC, original submission:  

Steps to reproduce:

- "bash --version" tells this:
GNU bash, version 5.2.15(1)-release (x86_64-pc-linux-gnu)
- I have debian sid linux x86_64
- debian's package "bash-completion" is not installed
- do this:

# mkdir a
# cd a
# mkdir a=a
# cd a=<Tab>

- When I press Tab, I see this: "cd a=a\=a/". This is clearly wrong result. "cd a=a/" or "cd a\=a/" should be

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by safinaskar (Posted a comment)
  • -email is unavailable- added by chet (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-05-03 chet StatusNone Invalid

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code