Skip to content

Handle some annoyances in fish external completer#1955

Merged
fdncred merged 2 commits into
nushell:mainfrom
scarlet-storm:main
Jun 26, 2025
Merged

Handle some annoyances in fish external completer#1955
fdncred merged 2 commits into
nushell:mainfrom
scarlet-storm:main

Conversation

@scarlet-storm
Copy link
Copy Markdown
Contributor

No description provided.

In case the completion string has any singlequotes,
escape them before passing it to external fish command.
Else the completion will fail due to unmatched quotes.

eg. vim '/home <tab>
This fixes completions for paths which have "~".
~ expansion will no longer work after the path is enclosed
in double quotes, hence expand the path before returning the completion
so that subsequent completions will continue to work

eg. vim ~/Doc <tab> <tab>
The second completion will not work as the path will be enclosed with
double quotes after first completion
@scarlet-storm scarlet-storm changed the title Handle some corner cases in fish external completer Handle some annoyances in fish external completer Jun 26, 2025
@fdncred fdncred merged commit 670b230 into nushell:main Jun 26, 2025
2 checks passed
@fdncred
Copy link
Copy Markdown
Contributor

fdncred commented Jun 26, 2025

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants