You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here are some directories and files on a macOS system (only showing entries as examples relevant to this issue):
~/Library/
Application\ Scripts/
Application\ Support/
.DS_Store
AddressBook
App\ Store
AskPermission
DVD\ Player
I have the latest .fzf_bash_completion script loaded—although the issue has been around for quite some time—and I have neither of the auto common prefix options (FZF_COMPLETION_AUTO_COMMON_PREFIX and FZF_COMPLETION_AUTO_COMMON_PREFIX_PART) defined, so base completion behavior...
$ ls ~/Lib<tab> This works fine as there's only one match. $ ls ~/Library/(cursor after added slash)
$ ls ~/Library/<tab> Popup appears with entries. For example:
Note that Application\ Support/ is backslash-escaped in the list.
FWIW, I also use Amazon Q CLI autocomplete, and names containing spaces are shown not-escaped in their popup, i.e. Application Support/
I choose ~/Library/Application\ Support/ and hit Enter. $ ls ~/Library/Application\ Support/(cursor immediately after slash) So far so good, so I just hit Tab again.
$ ls ~/Library/Application\ Support/<tab> Popup appears with bad entries. For example:
> ls ~/Library/Application\ Support/
────────────────────────────────────────────────
▶ ~/Library/Application\\\ Support/.DS_Store
~/Library/Application\\\ Support/AddressBook
~/Library/Application\\\ Support/App\ Store
~/Library/Application\\\ Support/AskPermission
~/Library/Application\\\ Support/DVD\ Player
Note that the existing path is now re-escaped ("\ " becomes "\\\ ") while base entry names are only backslash-escaped as needed, like before.
I choose ~/Library/Application\\\ Support/App\ Store and hit Enter. $ ls ~/Library/Application\\\ Support/App\ Store (cursor after space but no slash) If I hit Enter now, I obviously get "No such file or directory"
I would have expected to see: $ ls ~/Library/Application\ Support/App\ Store/(cursor immediately after slash)
The text was updated successfully, but these errors were encountered:
erhhung
changed the title
Tab completion incorrectly re-escapes already escaped spaces
Tab completion incorrectly re-escapes already escaped path
Dec 4, 2024
Here are some directories and files on a macOS system
(only showing entries as examples relevant to this issue):
I have the latest
.fzf_bash_completion
script loaded—although the issue has been around for quite some time—and I have neither of the auto common prefix options (FZF_COMPLETION_AUTO_COMMON_PREFIX
andFZF_COMPLETION_AUTO_COMMON_PREFIX_PART
) defined, so base completion behavior...$ ls ~/Lib
<tab>This works fine as there's only one match.
$ ls ~/Library/
(cursor after added slash)$ ls ~/Library/
<tab>Popup appears with entries. For example:
Note that
Application\ Support/
is backslash-escaped in the list.FWIW, I also use Amazon Q CLI autocomplete, and names containing spaces are shown not-escaped in their popup, i.e.
Application Support/
I choose
~/Library/Application\ Support/
and hit Enter.$ ls ~/Library/Application\ Support/
(cursor immediately after slash)So far so good, so I just hit Tab again.
$ ls ~/Library/Application\ Support/
<tab>Popup appears with bad entries. For example:
Note that the existing path is now re-escaped ("
\
" becomes "\\\
") while base entry names are only backslash-escaped as needed, like before.I choose
~/Library/Application\\\ Support/App\ Store
and hit Enter.$ ls ~/Library/Application\\\ Support/App\ Store
(cursor after space but no slash)If I hit Enter now, I obviously get "No such file or directory"
I would have expected to see:
$ ls ~/Library/Application\ Support/App\ Store/
(cursor immediately after slash)The text was updated successfully, but these errors were encountered: