2024-01-28 09:18:18 by Iku Iwasa | Files touched by this commit (3) |  |
Log message:
fzf: update to 0.46.0
* Added two new events
* result - triggered when the filtering for the current query is complete
and the result list is ready resize - triggered when the terminal size
* is changed
* fzf now exports the following environment variables to the child processes
Variable Description
FZF_LINES Number of lines fzf takes up excluding padding and margin
FZF_COLUMNS Number of columns fzf takes up excluding padding and margin
FZF_TOTAL_COUNT Total number of items
FZF_MATCH_COUNT Number of matched items
FZF_SELECT_COUNT Number of selected items
FZF_QUERY Current query string
FZF_PROMPT Prompt string
FZF_ACTION The name of the last action performed
* This allows you to write sophisticated transformations like so
# Script to dynamically resize the preview window
transformer='
# 1 line for info, another for prompt, and 2 more lines for preview window \
border
lines=$(( FZF_LINES - FZF_MATCH_COUNT - 4 ))
if [[ $FZF_MATCH_COUNT -eq 0 ]]; then
echo "change-preview-window:hidden"
elif [[ $lines -gt 3 ]]; then
echo "change-preview-window:$lines"
elif [[ $FZF_PREVIEW_LINES -ne 3 ]]; then
echo "change-preview-window:3"
fi
'
seq 10000 | fzf --preview 'seq {} 10000' --preview-window up \
--bind "result:transform:$transformer" \
--bind "resize:transform:$transformer"
* And we're phasing out {fzf:prompt} and {fzf:action}
* Changed: mattn/go-runewidth dependency to rivo/uniseg for accurate
results
* Set --ambidouble if your terminal displays ambiguous width characters
(e.g. box-drawing characters for borders) as 2 columns
* RUNEWIDTH_EASTASIAN=1 is still respected for backward compatibility,
but it's recommended that you use this new option instead
* Bug fixes
|
2024-01-10 20:14:43 by Benny Siegert | Files touched by this commit (152) |  |
Log message:
Revbump all Go packages after go121 update
|
2024-01-07 09:12:26 by Iku Iwasa | Files touched by this commit (3) |  |
Log message:
fzf: update to 0.45.0
* Added transform action to conditionally perform a series of actions
# Disallow selecting an empty line
echo -e "1. Hello\n2. Goodbye\n\n3. Exit" |
fzf --height '~100%' --reverse --header 'Select one' \
--bind 'enter:transform:[[ -n {} ]] && echo accept || echo \
"change-header:Invalid selection"'
# Move cursor past the empty line
echo -e "1. Hello\n2. Goodbye\n\n3. Exit" |
fzf --height '~100%' --reverse --header 'Select one' \
--bind 'enter:transform:[[ -n {} ]] && echo accept || echo \
"change-header:Invalid selection"' \
--bind 'focus:transform:[[ -n {} ]] && exit; [[ {fzf:action} \
=~ up$ ]] && echo up || echo down'
# A single key binding to toggle between modes
fd --type file |
fzf --prompt 'Files> ' \
--header 'CTRL-T: Switch between Files/Directories' \
--bind 'ctrl-t:transform:[[ ! {fzf:prompt} =~ Files ]] &&
echo "change-prompt(Files> )+reload(fd --type \
file)" ||
echo "change-prompt(Directories> )+reload(fd --type \
directory)"'
* Added placeholder expressions
* {fzf:action} - The name of the last action performed
* {fzf:prompt} - Prompt string (including ANSI color codes)
* {fzf:query} - Synonym for {q}
* Added support for negative height
# Terminal height minus 1, so you can still see the command line
fzf --height=-1
This handles a terminal resize better than --height=$(($(tput lines) - 1))
* Added: accept-or-print-query action that acts like accept but prints the
current query when there's no match for the query
# You can make CTRL-R paste the current query when there's no match
export FZF_CTRL_R_OPTS='--bind enter:accept-or-print-query'
* Note that there are alternative ways to implement the same strategy
# 'become' is apparently more versatile but it's not available on Windows.
export FZF_CTRL_R_OPTS='--bind "enter:become:if [ -z {} ]; then echo \
{q}; else echo {}; fi"'
# Using the new 'transform' action
export FZF_CTRL_R_OPTS='--bind "enter:transform:[ -z {} ] && \
echo print-query || echo accept"'
* Added show-header and hide-header actions
* Bug fixes
|
2023-12-05 20:46:19 by Benny Siegert | Files touched by this commit (146) |  |
Log message:
Revbump all Go packages after go121 update
|
2023-11-19 01:38:13 by Iku Iwasa | Files touched by this commit (4) |  |
Log message:
fzf: update to 0.44.1
Pkgsrc changes:
* Include bin/fzf-preview.sh in the package.
Upstream changes:
0.44.1
* Fixed crash when preview window is hidden on focus event
0.44.0
* (Experimental) Sixel image support in preview window (not available on
Windows)
* bin/fzf-preview.sh is added to demonstrate how to display an image
using Kitty image protocol or Sixel. You can use it like so:
fzf --preview='fzf-preview.sh {}'
* (Experimental) iTerm2 inline image protocol support in preview window
(not available on Windows)
# Using https://iterm2.com/utilities/imgcat
fzf --preview 'imgcat -W $FZF_PREVIEW_COLUMNS -H $FZF_PREVIEW_LINES {}'
* HTTP server can be configured to accept remote connections
# FZF_API_KEY is required for a non-localhost listen address
export FZF_API_KEY="$(head -c 32 /dev/urandom | base64)"
fzf --listen 0.0.0.0:6266
* To allow remote process execution, use --listen-unsafe instead
(execute*, reload*, become, preview, change-preview, transform-*)
fzf --listen-unsafe 0.0.0.0:6266
|
2023-11-10 16:45:25 by Benny Siegert | Files touched by this commit (152) |  |
Log message:
Revbump all Go packages after go121 update
|
2023-10-29 15:48:24 by Benny Siegert | Files touched by this commit (152) |
Log message:
Revbump all Go packages because go121 is now the default
|
2023-10-15 14:04:35 by Benny Siegert | Files touched by this commit (155) |  |
Log message:
Revbump all Go packages after go120 security update
|
2023-10-15 04:07:09 by Iku Iwasa | Files touched by this commit (3) |  |
Log message:
fzf: update to 0.43.0
* (Experimental) Added support for Kitty image protocol in the preview window
fzf --preview='
if file --mime-type {} | grep -qF image/; then
# --transfer-mode=memory is the fastest option but if you want fzf \
to be able
# to redraw the image on terminal resize or on 'change-preview-window',
# you need to use --transfer-mode=stream.
kitty icat --clear --transfer-mode=memory --stdin=no \
--place=${FZF_PREVIEW_COLUMNS}x${FZF_PREVIEW_LINES}@0x0 {} | sed \$d
else
bat --color=always {}
fi
'
* (Experimental) --listen server can report program state in JSON format (GET /)
# fzf server started in "headless" mode
fzf --listen 6266 2> /dev/null
# Get program state
curl localhost:6266 | jq .
# Increase the number of items returned (default: 100)
curl localhost:6266?limit=1000 | jq .
* --listen server can be secured by setting $FZF_API_KEY environment variable.
export FZF_API_KEY="$(head -c 32 /dev/urandom | base64)"
# Server
fzf --listen 6266
# Client
curl localhost:6266 -H "x-api-key: $FZF_API_KEY" -d \
'change-query(yo)'
* Added toggle-header action
* Added mouse events for --bind
* scroll-up (bound to up)
* scroll-down (bound to down)
* shift-scroll-up (bound to toggle+up)
* shift-scroll-down (bound to toggle+down)
* shift-left-click (bound to toggle)
* shift-right-click (bound to toggle)
* preview-scroll-up (bound to preview-up)
* preview-scroll-down (bound to preview-down)
# Twice faster scrolling both in the main window and the preview window
fzf --bind 'scroll-up:up+up,scroll-down:down+down' \
--bind 'preview-scroll-up:preview-up+preview-up' \
--bind 'preview-scroll-down:preview-down+preview-down' \
--preview 'cat {}'
* Added offset-up and offset-down actions
# Scrolling will behave similarly to CTRL-E and CTRL-Y of vim
fzf --bind scroll-up:offset-up,scroll-down:offset-down \
--bind ctrl-y:offset-up,ctrl-e:offset-down \
--scroll-off=5
* Shell extensions
Updated bash completion for fzf options
bash key bindings no longer requires perl; it will use awk or mawk \
instead if perl is not found
Basic context-aware completion for ssh command
Applied --scheme=path for better ordering of the result
* Bug fixes and improvements
|
2023-09-08 21:06:15 by Benny Siegert | Files touched by this commit (154) |  |
Log message:
Revbump all Go packages after go120 update
|