Subject: CVS commit: pkgsrc/sysutils/fzf
From: Iku Iwasa
Date: 2024-04-21 10:54:36
Message id: 20240421085436.8DEB9FA2C@cvs.NetBSD.org

Log Message:
fzf: update to 0.50.0

0.50.0

* Search performance optimization. You can observe 50%+ improvement in some
  scenarios.

    $ rg --line-number --no-heading --smart-case . > $DATA

    $ wc < $DATA
     5520118 26862362 897487793

    $ hyperfine -w 1 -L bin fzf-0.49.0,fzf-7ce6452,fzf-a5447b8,fzf '{bin} \ 
--filter "///" < $DATA | head -30'
    Summary
      fzf --filter "///" < $DATA | head -30 ran
        1.16 ± 0.03 times faster than fzf-a5447b8 --filter "///" < \ 
$DATA | head -30
        1.23 ± 0.03 times faster than fzf-7ce6452 --filter "///" < \ 
$DATA | head -30
        1.52 ± 0.03 times faster than fzf-0.49.0 --filter "///" < \ 
$DATA | head -30

* Added: jump and jump-cancel events that are triggered when leaving jump
  mode

    # Default behavior
    fzf --bind space:jump

    # Same as jump-accept action
    fzf --bind space:jump,jump:accept

    # Accept on jump, abort on cancel
    fzf --bind space:jump,jump:accept,jump-cancel:abort

    # Change header on jump-cancel
    fzf --bind 'space:change-header(Type jump \ 
label)+jump,jump-cancel:change-header:Jump cancelled'

* Added: a new environment variable $FZF_KEY exported to the child
  processes. It's the name of the last key pressed.

   fzf: --bind 'space:jump,jump:accept,jump-cancel:transform:[[ $FZF_KEY =~ \ 
ctrl-c ]] && echo abort'

* fzf can be built with profiling options. See BUILD.md for more information.

* Bug fixes

0.49.0

* Ingestion: performance improved by around 40% (more or less depending on
  options)

    $ time wc data
     5513620 37997130 547840920 data

    real    0m0.822s
    user    0m0.764s
    sys     0m0.052s

    $ hyperfine -L bin fzf-0.48.1,fzf '{bin} --sync --bind load:accept < data'
    Benchmark 1: fzf-0.48.1 --sync --bind load:accept < data
      Time (mean ± σ):     440.3 ms ±   4.9 ms    [User: 501.8 ms, System: \ 
117.0 ms]
      Range (min … max):   432.8 ms … 446.1 ms    10 runs

    Benchmark 2: fzf --sync --bind load:accept < data
      Time (mean ± σ):     303.3 ms ±   4.5 ms    [User: 320.1 ms, System: \ 
108.6 ms]
      Range (min … max):   296.6 ms … 311.4 ms    10 runs

    Summary
      fzf --sync --bind load:accept < data ran
        1.45 ± 0.03 times faster than fzf-0.48.1 --sync --bind load:accept < data

* --info=hidden: and --info=inline-right will no longer hide the horizontal
  separator by default. This gives you more flexibility in customizing the
  layout.

    fzf --border --info=inline-right
    fzf --border --info=inline-right --separator ═
    fzf --border --info=inline-right --no-separator
    fzf --border --info=hidden
    fzf --border --info=hidden --separator ━
    fzf --border --info=hidden --no-separator

* Added two environment variables exported to the child processes

  * FZF_PREVIEW_LABEL
  * FZF_BORDER_LABEL

    # Use the current value of $FZF_PREVIEW_LABEL to determine which actions to \ 
perform
    git ls-files |
      fzf --header 'Press CTRL-P to change preview mode' \
          --bind='ctrl-p:transform:[[ $FZF_PREVIEW_LABEL =~ cat ]] \
          && echo "change-preview(git log --color=always \ 
\{})+change-preview-label([[ log ]])" \
          || echo "change-preview(bat --color=always \ 
\{})+change-preview-label([[ cat ]])"'

* Renamed: track action to track-current to highlight the difference
  between the global tracking state set by --track and a one-off tracking
  action
  * track is still available as an alias

* Added untrack-current and toggle-track-current actions
  * *-current actions are no-op when the global tracking state is set

* Bug fixes and minor improvements

Files:
RevisionActionfile
1.86modifypkgsrc/sysutils/fzf/Makefile
1.23modifypkgsrc/sysutils/fzf/distinfo
1.11modifypkgsrc/sysutils/fzf/go-modules.mk