Skip to content

optimize fish_completer path lookups#1963

Merged
fdncred merged 1 commit into
nushell:mainfrom
scarlet-storm:fish_completer
Jul 3, 2025
Merged

optimize fish_completer path lookups#1963
fdncred merged 1 commit into
nushell:mainfrom
scarlet-storm:fish_completer

Conversation

@scarlet-storm
Copy link
Copy Markdown
Contributor

Check if string needs escaping before doing a path lookup. This avoids looking up the path, unless the completion contains special characters that need escaping

@fdncred
Copy link
Copy Markdown
Contributor

fdncred commented Jul 3, 2025

Thanks. I'd like the $v to be a bit more verbose in name and also, it would be good to explain what's going on in the section below that describes what's happening. The cookbook needs to be able to explain itself.

Check if string needs escaping before doing a path lookup.
This avoids looking up the path, unless the completion contains
special characters that need escaping
@scarlet-storm
Copy link
Copy Markdown
Contributor Author

scarlet-storm commented Jul 3, 2025

Thanks. I'd like the $v to be a bit more verbose in name and also, it would be good to explain what's going on in the section below that describes what's happening. The cookbook needs to be able to explain itself.

I modified the section to add a short exlanation on the changes. Also renamed the closure variable to $row and the completion value variable to $value

@fdncred
Copy link
Copy Markdown
Contributor

fdncred commented Jul 3, 2025

Thanks

@fdncred fdncred merged commit 8f0014f into nushell:main Jul 3, 2025
2 checks passed
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