Compare commits

...

5 Commits

Author SHA1 Message Date
Junegunn Choi a24deef77b 0.73.0 2026-05-24 00:15:16 +09:00
Junegunn Choi 1b6e17ca39 nushell: [uninstall] Query nu for autoload directory
Mirror the install fix. Fall back to the XDG path when `nu` is no
longer on PATH (e.g. nushell already uninstalled).
2026-05-24 00:13:24 +09:00
Junegunn Choi 94f6daa61c nushell: [install] Query nu for autoload directory
Nushell uses platform-native config dirs (Application Support on
macOS, AppData on Windows), so $XDG_CONFIG_HOME/nushell/autoload is
wrong outside Linux and the generated file is silently ignored.
Ask `nu` for `$nu.user-autoload-dirs` instead. Safe because the
earlier shells loop already drops `nushell` from $shells when `nu`
is not on PATH.
2026-05-23 23:36:24 +09:00
Junegunn Choi 02594f8dbc nushell: Rename duplicate __fzf_defaults in completion.nu
`fzf --nushell` concatenates key-bindings.nu and completion.nu, both
of which defined `__fzf_defaults`, causing the resulting autoload file
to fail parsing:

  Error: nu::parser::duplicate_command_def

    x Duplicate command definition within a block.
       ,-[/Users/jg/.config/nushell/autoload/_fzf_integration.nu:211:5]
   210 | # Helper to build default fzf options list
   211 | def __fzf_defaults [prepend: string, append: string]: nothing -> string {
       :     ------+------
       :           `-- defined more than once
   212 |   let base = $"--height ($env.FZF_TMUX_HEIGHT? | default '40%') ...
       `----

Rename the completion.nu copy to `__fzf_defaults_completion`.
2026-05-23 23:34:04 +09:00
Junegunn Choi f81cb1939c nushell: [install] Print absolute path to the generated file 2026-05-23 23:32:00 +09:00
9 changed files with 35 additions and 20 deletions
+14 -5
View File
@@ -3,9 +3,13 @@ CHANGELOG
0.73.0 0.73.0
------ ------
- Timer-driven `every(N)` event for `--bind`, where `N` is seconds (fractional, floored to `0.01`). Ticks that overlap an in-flight action are coalesced, so a slow `reload` cannot accumulate a backlog. _Release highlights: https://junegunn.github.io/fzf/releases/0.73.0/_
- New `FZF_CURRENT_ITEM` environment variable exported to child processes, holding the text of the current item. Useful on shells where quoting `{}` is awkward (e.g. PowerShell on Windows). Unset when the list is empty (#4802).
- New `FZF_IDLE_TIME` (whole seconds) and `FZF_IDLE_TIME_MS` (milliseconds) environment variables exported to child processes, holding the elapsed time since the last user activity. Pair with `every(N)` to build idle-based behavior such as auto-accept or auto-quit (#1211). - Nushell integration via `fzf --nushell` and the installer (#4630) (@sim590)
- New `--preview-window=next` position that places the preview adjacent to the input section, on the list side: above the input in the default layout, below it in `--layout=reverse` (#4798)
- Timer-driven `every(N)` event for `--bind`, where `N` is seconds
- Added `$FZF_IDLE_TIME` (whole seconds) and `$FZF_IDLE_TIME_MS` (milliseconds), holding the elapsed time since the last user activity
- Pair with `every(N)` to build idle-based behavior such as auto-accept or auto-quit (#1211)
```sh ```sh
# Live process list; --track --id-nth 2 keeps the cursor on the same PID across reloads # Live process list; --track --id-nth 2 keeps the cursor on the same PID across reloads
fzf --header-lines 1 --track --id-nth 2 --bind 'start,every(2):reload-sync:ps -ef' fzf --header-lines 1 --track --id-nth 2 --bind 'start,every(2):reload-sync:ps -ef'
@@ -17,9 +21,14 @@ CHANGELOG
else echo accept else echo accept
fi' fi'
``` ```
- New `--preview-window=next` position that places the preview adjacent to the input section, on the list side: above the input in the default layout, below it in `--layout=reverse` (#4798). - Added `$FZF_CURRENT_ITEM` for shells where quoting `{}` is awkward (#4802)
- Bug fixes - Bug fixes
- `change-preview-window` no longer resets `wrap` / `wrap-word` state set via `toggle-preview-wrap` / `toggle-preview-wrap-word`. Layout fields still snap to the preset, so cycling and the empty-token reset behave as before. The new spec can still override by including `wrap` or `nowrap` explicitly. (#4791) - Scoring: non-word characters at the start of input or after a delimiter now receive the same boundary bonus as word characters (#4795)
- `change-preview-window` no longer resets `wrap` / `wrap-word` state set via `toggle-preview-wrap` / `toggle-preview-wrap-word` (#4791)
- Stripped UTF-8-encoded C1 control characters from rendered items to prevent terminal control-sequence injection
- Fixed integer-overflow panic in `FuzzyMatchV2` on 32-bit builds (Michal Majchrowicz, Marcin Wyczechowski, AFINE Team)
- Fixed `bg-transform` `reload` / `exclude` payloads being dropped
- Fixed rendering glitch with preview window on the left combined with footer
0.72.0 0.72.0
------ ------
+3 -2
View File
@@ -533,15 +533,16 @@ the following key bindings in bash, zsh, fish, and Nushell.
``` ```
- Can be disabled by setting `FZF_CTRL_T_COMMAND` to an empty string when - Can be disabled by setting `FZF_CTRL_T_COMMAND` to an empty string when
sourcing the script sourcing the script
- `CTRL-R` - Paste the selected command from history onto the command-line. With fish shell, it is possible to select multiple commands. - `CTRL-R` - Paste the selected command from history onto the command-line.
- Select multiple commands with `TAB`.
- If you want to see the commands in chronological order, press `CTRL-R` - If you want to see the commands in chronological order, press `CTRL-R`
again which toggles sorting by relevance again which toggles sorting by relevance
- Press `ALT-R` to toggle "raw" mode where you can see the surrounding items - Press `ALT-R` to toggle "raw" mode where you can see the surrounding items
of a match. In this mode, you can press `CTRL-N` and `CTRL-P` to move of a match. In this mode, you can press `CTRL-N` and `CTRL-P` to move
between the matching items only. between the matching items only.
- Press `CTRL-/` or `ALT-/` to toggle line wrapping - Press `CTRL-/` or `ALT-/` to toggle line wrapping
- Press `SHIFT-DELETE` to delete the selected commands (bash and fish)
- Fish shell only: - Fish shell only:
- Press `SHIFT-DELETE` to delete the selected commands
- Press `ALT-ENTER` to reformat and insert the selected commands - Press `ALT-ENTER` to reformat and insert the selected commands
- Press `ALT-T` to cycle through command prefix (timestamp, date/time, none) - Press `ALT-T` to cycle through command prefix (timestamp, date/time, none)
- Set `FZF_CTRL_R_OPTS` to pass additional options to fzf - Set `FZF_CTRL_R_OPTS` to pass additional options to fzf
+7 -6
View File
@@ -2,7 +2,7 @@
set -u set -u
version=0.72.0 version=0.73.0
auto_completion= auto_completion=
key_bindings= key_bindings=
update_config=2 update_config=2
@@ -10,7 +10,6 @@ shells="bash zsh fish nushell"
prefix='~/.fzf' prefix='~/.fzf'
prefix_expand=~/.fzf prefix_expand=~/.fzf
fish_dir=${XDG_CONFIG_HOME:-$HOME/.config}/fish fish_dir=${XDG_CONFIG_HOME:-$HOME/.config}/fish
nushell_autoload_dir=${XDG_CONFIG_HOME:-$HOME/.config}/nushell/autoload
help() { help() {
cat << EOF cat << EOF
@@ -446,14 +445,16 @@ fi
if [[ "$shells" =~ nushell ]]; then if [[ "$shells" =~ nushell ]]; then
if [[ $key_bindings -eq 1 || $auto_completion -eq 1 ]]; then if [[ $key_bindings -eq 1 || $auto_completion -eq 1 ]]; then
echo "Setting up Nushell integration ..." echo "Setting up Nushell integration ..."
nushell_autoload_dir=$(nu -c '$nu.user-autoload-dirs | first')
mkdir -p "$nushell_autoload_dir" mkdir -p "$nushell_autoload_dir"
echo -n " Generate _fzf_integration.nu ... " dest="$nushell_autoload_dir/_fzf_integration.nu"
echo -n " Generate $dest ... "
if [[ $key_bindings -eq 1 && $auto_completion -eq 1 ]]; then if [[ $key_bindings -eq 1 && $auto_completion -eq 1 ]]; then
"$fzf_base"/bin/fzf --nushell > "$nushell_autoload_dir/_fzf_integration.nu" "$fzf_base"/bin/fzf --nushell > "$dest"
elif [[ $key_bindings -eq 1 ]]; then elif [[ $key_bindings -eq 1 ]]; then
cp "$fzf_base/shell/key-bindings.nu" "$nushell_autoload_dir/_fzf_integration.nu" cp "$fzf_base/shell/key-bindings.nu" "$dest"
else else
cp "$fzf_base/shell/completion.nu" "$nushell_autoload_dir/_fzf_integration.nu" cp "$fzf_base/shell/completion.nu" "$dest"
fi fi
echo "OK" echo "OK"
echo echo
+1 -1
View File
@@ -1,4 +1,4 @@
$version="0.72.0" $version="0.73.0"
$fzf_base=Split-Path -Parent $MyInvocation.MyCommand.Definition $fzf_base=Split-Path -Parent $MyInvocation.MyCommand.Definition
+1 -1
View File
@@ -11,7 +11,7 @@ import (
"github.com/junegunn/fzf/src/protector" "github.com/junegunn/fzf/src/protector"
) )
var version = "0.72" var version = "0.73"
var revision = "devel" var revision = "devel"
//go:embed shell/key-bindings.bash //go:embed shell/key-bindings.bash
+1 -1
View File
@@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
.. ..
.TH fzf\-tmux 1 "Apr 2026" "fzf 0.72.0" "fzf\-tmux - open fzf in tmux split pane" .TH fzf\-tmux 1 "May 2026" "fzf 0.73.0" "fzf\-tmux - open fzf in tmux split pane"
.SH NAME .SH NAME
fzf\-tmux - open fzf in tmux split pane fzf\-tmux - open fzf in tmux split pane
+1 -1
View File
@@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
.. ..
.TH fzf 1 "Apr 2026" "fzf 0.72.0" "fzf - a command-line fuzzy finder" .TH fzf 1 "May 2026" "fzf 0.73.0" "fzf - a command-line fuzzy finder"
.SH NAME .SH NAME
fzf - a command-line fuzzy finder fzf - a command-line fuzzy finder
+2 -2
View File
@@ -39,7 +39,7 @@ $env.FZF_COMPLETION_DIR_COMMANDS = $env.FZF_COMPLETION_DIR_COMMANDS? | default [
# --- Helper Functions --- # --- Helper Functions ---
# Helper to build default fzf options list # Helper to build default fzf options list
def __fzf_defaults [prepend: string, append: string]: nothing -> string { def __fzf_defaults_completion [prepend: string, append: string]: nothing -> string {
let base = $"--height ($env.FZF_TMUX_HEIGHT? | default '40%') --min-height 20+ --bind=ctrl-z:ignore ($prepend)" let base = $"--height ($env.FZF_TMUX_HEIGHT? | default '40%') --min-height 20+ --bind=ctrl-z:ignore ($prepend)"
let opts_file = if ($env.FZF_DEFAULT_OPTS_FILE? | default '' | is-not-empty) { let opts_file = if ($env.FZF_DEFAULT_OPTS_FILE? | default '' | is-not-empty) {
try { open --raw ($env.FZF_DEFAULT_OPTS_FILE) | str trim } catch { '' } try { open --raw ($env.FZF_DEFAULT_OPTS_FILE) | str trim } catch { '' }
@@ -62,7 +62,7 @@ def __fzf_comprun [ context_name: string # e.g., "fzf-completion" , "fzf-h
null # Set to null if there's no stdin or an error occurs reading it null # Set to null if there's no stdin or an error occurs reading it
} }
let fzf_default_opts = (__fzf_defaults "" ($env.FZF_COMPLETION_OPTS | default '')) let fzf_default_opts = (__fzf_defaults_completion "" ($env.FZF_COMPLETION_OPTS | default ''))
let fzf_prefinal_opt = ['--query', $query, '--reverse'] | append $fzf_opts_arg let fzf_prefinal_opt = ['--query', $query, '--reverse'] | append $fzf_opts_arg
# Get the configured height, defaulting to '40%' # Get the configured height, defaulting to '40%'
+5 -1
View File
@@ -114,7 +114,11 @@ if [ -d "${fish_dir}/functions" ]; then
fi fi
fi fi
nushell_autoload_dir=${XDG_CONFIG_HOME:-$HOME/.config}/nushell/autoload if command -v nu > /dev/null; then
nushell_autoload_dir=$(nu -c '$nu.user-autoload-dirs | first')
else
nushell_autoload_dir=${XDG_CONFIG_HOME:-$HOME/.config}/nushell/autoload
fi
remove "${nushell_autoload_dir}/_fzf_integration.nu" remove "${nushell_autoload_dir}/_fzf_integration.nu"
config_dir=$(dirname "$prefix_expand") config_dir=$(dirname "$prefix_expand")