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
|
Hi @junegunn, I've done a significant overhaul of the nushell integration to address all the points you raised. Here's a summary of the changes: Alignment with bash/zsh/fishKey bindings (
Completion (
Installation approachUnlike bash/zsh where the install script appends a Infrastructure
Tests
Notable nushell-specific decisions
Question: git completion?While reviewing coverage, I noticed that none of the shell implementations (bash, zsh, fish) include dedicated fzf completion for git (branches, tags, remotes, etc.). This could be a useful addition for nushell (and potentially other shells), but I don't want to exceed the expected scope of this PR. Would this be something you'd welcome as a follow-up, or is it better left to third-party tools? |
|
Hi, please rebase work onto the latest master. In the meanwhile, fish got its fuzzy completion. |
Skip sudo prefix to determine the actual command for completion dispatch. Add paru as an alias for pacman completion. Show package info preview with pacman -Si in the fzf selector. Co-authored-by: René Jochum <rene@jochum.dev>
|
Done! |
Move the Nushell fuzzy completion documentation into its own section after the fish completion section, matching the project structure. Remove debug_nu_2.rb that was accidentally included.
There was a problem hiding this comment.
Pull request overview
Adds first-class Nushell integration to fzf, aligning with existing bash/zsh/fish integrations by shipping keybindings + completion scripts, wiring them into fzf --nushell, and updating install/uninstall/docs/tests accordingly.
Changes:
- Add
--nushellCLI flag to print Nushell integration scripts (embedded in the binary). - Add Nushell keybindings (
alt-c,ctrl-r,ctrl-t) and**<TAB>completion via Nushell external completer. - Update install/uninstall scripts, README, and test harness to support Nushell.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
install |
Adds nushell to supported shells and generates autoload/fzf.nu via fzf --nushell. |
uninstall |
Removes generated Nushell autoload script. |
main.go |
Embeds .nu scripts and prints them when --nushell is requested. |
src/options.go |
Adds --nushell option parsing and Options.Nushell. |
shell/key-bindings.nu |
Implements Nushell keybindings and fzf-tmux selection logic. |
shell/completion.nu |
Implements Nushell external completer (**) and command-specific completions. |
test/lib/common.rb |
Adds Nushell tmux shell bootstrap and tweaks prepare for Nushell. |
test/test_shell_integration.rb |
Adds Nushell keybinding tests. |
README.md |
Documents Nushell setup and Nushell-specific completion behavior/variables. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Remove FZF_COMPLETION_VAR_COMMANDS (export/unset/printenv completions were already removed, the variable was left behind) - Fix typos: 'an Nushell' -> 'a Nushell', 'does't' -> 'doesn't', 'exept' -> 'except' - Guard ALT-C cd with is-not-empty check to prevent errors when fzf is cancelled
Add a basic **<TAB> file completion test that exercises the external completer pipeline. Uses single selection since nushell's completion system replaces the current token rather than appending.
- Restore 'src=${prefix_expand}.${shell}' that was lost during merge
conflict resolution, which caused the install script to write to an
undefined path for bash/zsh
- Fix non-idiomatic 'let $fzf_all_opts' to 'let fzf_all_opts' in
completion.nu
pacman -Slq is a valid flag, not a typo for Sql.
Add the Gemfury apt repository for nushell so that integration tests can run against nu in CI.
Use single quotes where there is no interpolation, replace assert+include? with assert_includes, and use safe navigation operator in teardown to prevent NoMethodError.
|
I added nushell installation to the CI workflow ( I also fixed the typos spell checker false positive on |
| install script, you can manually set it up: | ||
| ```nu | ||
| # Generate the integration script | ||
| # (run this in your regular shell, not in Nushell) |
There was a problem hiding this comment.
Care to explain what this means? What are the regular shells, anything but Nushell? Can they interpret this command?
There was a problem hiding this comment.
Pull request overview
Adds first-class Nushell integration to fzf, including keybindings, **<TAB> fuzzy completion via Nushell’s external completer mechanism, installation/uninstallation support, and CI/test coverage to prevent regressions.
Changes:
- Add
fzf --nushellflag that prints Nushell integration scripts (keybindings + completion) - Add Nushell install/uninstall handling (autoload
fzf.nu) and update docs - Add Nushell integration tests + Linux CI dependency install for nushell
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
main.go |
Embeds and prints Nushell integration scripts when --nushell is used |
src/options.go |
Adds --nushell option parsing and Options.Nushell flag |
shell/key-bindings.nu |
Implements CTRL-T / CTRL-R / ALT-C bindings for Nushell |
shell/completion.nu |
Implements ** completion via Nushell external completer + command-specific completers |
install |
Adds Nushell to supported shells and generates autoload fzf.nu |
uninstall |
Removes Nushell autoload file during uninstall |
README.md |
Documents Nushell integration setup and limitations |
test/lib/common.rb |
Adds Nushell shell harness + tmux prep behavior |
test/test_shell_integration.rb |
Adds Nushell-specific integration tests (bindings + completion smoke test) |
.github/workflows/linux.yml |
Installs nushell in CI to run Nushell tests |
typos.toml |
Adds Slq to allowed words (for pacman -Slq) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Assuming standard ps output where PID is the second column | ||
| $selected_line | lines | each { $in | from ssv --noheaders | get 0.column1 } | to text |
| install script, you can manually set it up: | ||
| ```nu | ||
| # Generate the integration script | ||
| # (run this in your regular shell, not in Nushell) |
|
|
||
| > [!NOTE] | ||
| > `--bash`, `--zsh`, and `--fish` options are only available in fzf 0.48.0 or | ||
| > `--bash`, `--zsh`, `--fish`, and `--nushell` options are only available in fzf 0.48.0 or |
alt_c,ctrl_randctrl_t**completionCloses: #4122