shell: nushell integration scripts#4630
Conversation
Fixes some path issues. There are still some other things to fix
Pass~[1] is a command line password storage utility. Possible queries are deduced from the file GPG hierarchy under ~/.password-store. [1]: https://www.passwordstore.org/
Not sure why it doesn't work in this context, but if those are not removed, the completion process doesn't substitute the selected value to '**'.
fix typo shell/key-bindinds.nu → shell/key-bindings.nu
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
The _nu suffix is unnecessary since these functions are only loaded in nushell. The only exception is __fzf_defaults_nu which keeps its suffix to avoid conflicting with __fzf_defaults in key-bindings.nu.
Rename __fzf_defaults_nu to __fzf_defaults and align the implementation with the identical function in key-bindings.nu, as suggested by @junegunn.
Save the pre-fzf completer in $env.__fzf_previous_completer on first load. On re-source, use that saved reference as the base instead of the current completer (which is already the fzf wrapper), preventing wrapper nesting while still allowing re-sourcing to take effect.
|
I'm not a nushell user so I might be missing something, but that the fuzzy completion is not always available is quite confusing to me. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
These are fundamental limitations of Nushell's completion architecture:
AFAIK, there's no way around these limitations without changes on the Nushell side. |
…ushell Like fish, the nushell block now checks $key_bindings and $auto_completion. When both are enabled, fzf --nushell is used as before. When only one is enabled, the relevant section is extracted from fzf --nushell output via awk, embedding the content directly rather than sourcing from an absolute path.
Rename the generated nushell autoload file to _fzf_integration.nu to reduce the risk of overwriting a user's custom script. Also replace the awk extraction with a direct cp of the relevant source file for the partial key-bindings/completion cases.
junegunn
left a comment
There was a problem hiding this comment.
Thanks for the persistence; it's good to go.
But I'll merge it right before I release a new version so the README doesn't mention unreleased features and confuse users.
|
Ah, we also need to update Lines 1352 to 1369 in 263eb47 |
alt_c,ctrl_randctrl_t**completionCloses: #4122