mirror of
https://github.com/junegunn/fzf.git
synced 2026-06-14 03:29:56 +08:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a24deef77b | |||
| 1b6e17ca39 | |||
| 94f6daa61c | |||
| 02594f8dbc | |||
| f81cb1939c |
+14
-5
@@ -3,9 +3,13 @@ CHANGELOG
|
||||
|
||||
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.
|
||||
- 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).
|
||||
_Release highlights: https://junegunn.github.io/fzf/releases/0.73.0/_
|
||||
|
||||
- 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
|
||||
# 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'
|
||||
@@ -17,9 +21,14 @@ CHANGELOG
|
||||
else echo accept
|
||||
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
|
||||
- `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
|
||||
------
|
||||
|
||||
@@ -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
|
||||
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`
|
||||
again which toggles sorting by relevance
|
||||
- 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
|
||||
between the matching items only.
|
||||
- Press `CTRL-/` or `ALT-/` to toggle line wrapping
|
||||
- Press `SHIFT-DELETE` to delete the selected commands (bash and fish)
|
||||
- Fish shell only:
|
||||
- Press `SHIFT-DELETE` to delete 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)
|
||||
- Set `FZF_CTRL_R_OPTS` to pass additional options to fzf
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
set -u
|
||||
|
||||
version=0.72.0
|
||||
version=0.73.0
|
||||
auto_completion=
|
||||
key_bindings=
|
||||
update_config=2
|
||||
@@ -10,7 +10,6 @@ shells="bash zsh fish nushell"
|
||||
prefix='~/.fzf'
|
||||
prefix_expand=~/.fzf
|
||||
fish_dir=${XDG_CONFIG_HOME:-$HOME/.config}/fish
|
||||
nushell_autoload_dir=${XDG_CONFIG_HOME:-$HOME/.config}/nushell/autoload
|
||||
|
||||
help() {
|
||||
cat << EOF
|
||||
@@ -446,14 +445,16 @@ fi
|
||||
if [[ "$shells" =~ nushell ]]; then
|
||||
if [[ $key_bindings -eq 1 || $auto_completion -eq 1 ]]; then
|
||||
echo "Setting up Nushell integration ..."
|
||||
nushell_autoload_dir=$(nu -c '$nu.user-autoload-dirs | first')
|
||||
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
|
||||
"$fzf_base"/bin/fzf --nushell > "$nushell_autoload_dir/_fzf_integration.nu"
|
||||
"$fzf_base"/bin/fzf --nushell > "$dest"
|
||||
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
|
||||
cp "$fzf_base/shell/completion.nu" "$nushell_autoload_dir/_fzf_integration.nu"
|
||||
cp "$fzf_base/shell/completion.nu" "$dest"
|
||||
fi
|
||||
echo "OK"
|
||||
echo
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
$version="0.72.0"
|
||||
$version="0.73.0"
|
||||
|
||||
$fzf_base=Split-Path -Parent $MyInvocation.MyCommand.Definition
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"github.com/junegunn/fzf/src/protector"
|
||||
)
|
||||
|
||||
var version = "0.72"
|
||||
var version = "0.73"
|
||||
var revision = "devel"
|
||||
|
||||
//go:embed shell/key-bindings.bash
|
||||
|
||||
+1
-1
@@ -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
|
||||
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
|
||||
fzf\-tmux - open fzf in tmux split pane
|
||||
|
||||
+1
-1
@@ -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
|
||||
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
|
||||
fzf - a command-line fuzzy finder
|
||||
|
||||
+2
-2
@@ -39,7 +39,7 @@ $env.FZF_COMPLETION_DIR_COMMANDS = $env.FZF_COMPLETION_DIR_COMMANDS? | default [
|
||||
# --- Helper Functions ---
|
||||
|
||||
# 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 opts_file = if ($env.FZF_DEFAULT_OPTS_FILE? | default '' | is-not-empty) {
|
||||
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
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
# Get the configured height, defaulting to '40%'
|
||||
|
||||
@@ -114,7 +114,11 @@ if [ -d "${fish_dir}/functions" ]; then
|
||||
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"
|
||||
|
||||
config_dir=$(dirname "$prefix_expand")
|
||||
|
||||
Reference in New Issue
Block a user