Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bash: file completion - additional tilde prefix added #944

Closed
2 of 11 tasks
rsteube opened this issue Dec 2, 2023 · 1 comment · Fixed by #946
Closed
2 of 11 tasks

bash: file completion - additional tilde prefix added #944

rsteube opened this issue Dec 2, 2023 · 1 comment · Fixed by #946
Labels
bash bug Something isn't working

Comments

@rsteube
Copy link
Member

rsteube commented Dec 2, 2023

Current Behavior

Tab completing an open quoted path with tilde adds another one:

mv ~"/Downloads/with space<TAB>
# mv ~"~"/Downloads/with space" 

Expected Behavior

Not add another ~

Steps To Reproduce

No response

Version

0.45.0

OS

  • Linux
  • OSX
  • Windows

Shell

  • Bash
  • Elvish
  • Fish
  • Nushell
  • Oil
  • Powershell
  • Xonsh
  • Zsh

Anything else?

2023/12/02 20:59:36.723484 bash --------------------------------------------------------------------------------
2023/12/02 20:59:36.723536 bash []string{"carapace", "_carapace", "bash", "mv", "~/Downloads/w"}
2023/12/02 20:59:36.723622 bash COMPLINE "mv ~/Downloads/w"
2023/12/02 20:59:36.723656 bash patching args to []string{"bash", "mv", "~/Downloads/w"}
2023/12/02 20:59:36.723658 bash traverse called for "mv" with args []string{"~/Downloads/w"}
2023/12/02 20:59:36.723661 bash executing PreRun for "mv" with args []string{"~/Downloads/w"}
2023/12/02 20:59:36.723693 bash parsing flags for "mv" with args []string{}
2023/12/02 20:59:36.723696 bash completing positionals and subcommands for arg "~/Downloads/w"
false~"/Downloads/with space"
2023/12/02 20:59:42.023471 bash --------------------------------------------------------------------------------
2023/12/02 20:59:42.023531 bash []string{"carapace", "_carapace", "bash", "mv", "~/Downloads/with spac"}
2023/12/02 20:59:42.023632 bash COMPLINE "mv ~\"/Downloads/with spac"
2023/12/02 20:59:42.023666 bash patching args to []string{"bash", "mv", "~/Downloads/with spac"}
2023/12/02 20:59:42.023669 bash traverse called for "mv" with args []string{"~/Downloads/with spac"}
2023/12/02 20:59:42.023671 bash executing PreRun for "mv" with args []string{"~/Downloads/with spac"}
2023/12/02 20:59:42.023708 bash parsing flags for "mv" with args []string{}
2023/12/02 20:59:42.023710 bash completing positionals and subcommands for arg "~/Downloads/with spac"
false~"/Downloads/with space"

related #947

@rsteube rsteube added bug Something isn't working bash labels Dec 2, 2023
@rsteube
Copy link
Member Author

rsteube commented Dec 2, 2023

Should be an issue in carapace-shlex not correctly handling open quotes.

Looks like bash considers an open quote as wordbreak so anything before it won't be replaced.

@rsteube rsteube changed the title file completion: additional tilde prefix added bash: file completion - additional tilde prefix added Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bash bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant