[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tab completion error
From: |
Chet Ramey |
Subject: |
Re: tab completion error |
Date: |
Mon, 25 Sep 2023 09:12:00 -0400 |
User-agent: |
Mozilla Thunderbird |
On 9/22/23 5:58 PM, Brian Vargo wrote:
$ mv Bu<TAB> ---> $ mv Buehrer\,\ Ted/How\ to\ Listen\ to\ and\
Appreciate\ Jazz\ \[TMS\]\ \(2006\)/ "Bu<TAB> ----> $ mv Buehrer\,\
Ted/How\ to\ Listen\ to\ and\ Appreciate\ Jazz\ \[TMS\]\ \(2006\)/
"Buehrer, Ted"/<TAB> -----> $ mv Buehrer\,\ Ted/How\ to\ Listen\ to\ and\
Appreciate\ Jazz\ \[TMS\]\ \(2006\)/ "Buehrer, Ted"/"Buehrer, Ted/How to
Listen to and Appreciate Jazz [TMS] (2006)"/
I can't reproduce this. I'm testing with bash-5.2.
I get, broken into different lines for clarity:
$ mv Buehrer\,\ Ted/ [after the first tab]
$ mv Buehrer\,\ Ted/How\ to\ Listen\ to\ and\ Appreciate\ Jazz\ \[TMS\]\
\(2006\)/ [after the second tab]
(Note that default completion stops at directory boundaries; I'm not sure
how you got multiple directory names completed with a single tab.)
Then you add the space and start a new double-quoted argument:
$ mv Buehrer\,\ Ted/How\ to\ Listen\ to\ and\ Appreciate\ Jazz\ \[TMS\]\
\(2006\)/ "Buehrer, Ted"/ [after the third tab]
$ mv Buehrer\,\ Ted/How\ to\ Listen\ to\ and\ Appreciate\ Jazz\ \[TMS\]\
\(2006\)/ Buehrer\,\ Ted/How\ to\ Listen\ to\ and\ Appreciate\ Jazz\
\[TMS\]\ \(2006\)/ [after the fourth tab]
Note that bash/readline default completion requotes the entire pathname
once there is another directory name requiring quoting.
Now, this command will obviously fail because you're trying to move a
directory name to itself.
Expected:
For the last tab completion, I expect $ mv Buehrer\,\ Ted/How\ to\ Listen\
to\ and\ Appreciate\ Jazz\ \[TMS\]\ \(2006\)/ "Buehrer, Ted"/"How to Listen
to and Appreciate Jazz [TMS] (2006)"/
and then for it to change into that directory.
Quoting differences aside, these are identical directory names, so the
`mv'is going to fail regardless. But why would you expect bash or another
application to change to that directory?
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
- tab completion error, Brian Vargo, 2023/09/22
- Re: tab completion error,
Chet Ramey <=
- Re: tab completion error, Brian Vargo, 2023/09/25
- Re: tab completion error, Brian Vargo, 2023/09/25
- Re: tab completion error, Mike Jonkmans, 2023/09/25
- Re: tab completion error, Chet Ramey, 2023/09/25
- Re: tab completion error, Mike Jonkmans, 2023/09/25
- Re: tab completion error, Chet Ramey, 2023/09/28
- Re: tab completion error, Mike Jonkmans, 2023/09/28