mirror of
https://github.com/junegunn/fzf.git
synced 2026-10-26 20:16:32 +00:00
* fix(nushell): adapt the completer to the 0.116 contract Nushell 0.116 runs an external completer on a background worker without the terminal unless the registered closure reaches a command carrying the @interactive attribute. Interactivity is seen through the closure to the command it calls, so wrap the completion logic in an @interactive entry point and register a closure that ends with the call to it. Read the named `place` input instead of the deprecated positional `spans`; $place.command carries the same token list. An @interactive completer cannot decline with null (null reads as a dismissed picker), so request the fallback explicitly when the `**` trigger is absent, keeping plain file completion working. The previous external completer is still called when the trigger is absent. The script now requires Nushell 0.116+, since @interactive is a parse error on older versions. Fixes #4932 * fix(nushell): retry the previous completer with the legacy spans input The fallback to the previously configured external completer always handed it the new `place` input. A completer that still declares the legacy `spans` parameter errors on a record, so the fallback silently produced no completions for pre-0.116 completers (e.g. older Carapace installs). Try `place` first, then retry with the token list, which is what the old positional bridge handed such completers. * docs(nushell): note the 0.116 requirement and load order Requires Nushell 0.116.1+, where a completion can take the terminal through the @interactive attribute, and the wrapper captures the external completer present at load time.
63 lines
1.7 KiB
YAML
63 lines
1.7 KiB
YAML
---
|
|
name: build
|
|
|
|
on:
|
|
push:
|
|
branches: [ master, devel ]
|
|
pull_request:
|
|
branches: [ master, devel ]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
LANG: C.UTF-8
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v7
|
|
with:
|
|
go-version: "1.23"
|
|
|
|
- name: Setup Ruby
|
|
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1
|
|
with:
|
|
ruby-version: 3.4.6
|
|
|
|
- name: Install packages
|
|
run: |
|
|
sudo install -d -m 0755 /etc/apt/keyrings
|
|
wget -qO- https://apt.fury.io/nushell/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/fury-nushell.gpg
|
|
echo "deb [signed-by=/etc/apt/keyrings/fury-nushell.gpg] https://apt.fury.io/nushell/ /" | sudo tee /etc/apt/sources.list.d/fury-nushell.list
|
|
sudo apt-get update
|
|
# Pinned: the Nushell scripts now require 0.116+, where an external
|
|
# completer reaches the terminal through the @interactive attribute.
|
|
# Before that (e.g. 0.115.0), completers run on a background thread, so
|
|
# fzf never receives keystrokes. https://github.com/nushell/nushell/issues/18771
|
|
sudo apt-get install --yes zsh fish tmux shfmt nushell=0.116.1-0
|
|
|
|
- name: Install Ruby gems
|
|
run: bundle install
|
|
|
|
- name: Rubocop
|
|
run: make lint
|
|
|
|
- name: Unit test
|
|
run: make test
|
|
|
|
- name: Fuzz test
|
|
run: |
|
|
go test ./src/algo/ -fuzz=FuzzIndexByteTwo -fuzztime=5s
|
|
go test ./src/algo/ -fuzz=FuzzLastIndexByteTwo -fuzztime=5s
|
|
|
|
- name: Integration test
|
|
run: make install && ./install --all && tmux new-session -d && ruby test/runner.rb --verbose
|