Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency junegunn/fzf to v0.59.0 #1124

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 2, 2025

This PR contains the following updates:

Package Update Change
junegunn/fzf minor v0.58.0 -> v0.59.0

Release Notes

junegunn/fzf (junegunn/fzf)

v0.59.0: 0.59.0

Compare Source

Release highlights: https://junegunn.github.io/fzf/releases/0.59.0/

  • Prioritizing file name matches (#​4192)
    • Added a new tiebreak option pathname for prioritizing file name matches
    • --scheme=path now sets --tiebreak=pathname,length
    • fzf will automatically choose path scheme
      • when the input is a TTY device, where fzf would start its built-in walker or run $FZF_DEFAULT_COMMAND which is usually a command for listing files,
      • but not when reload or transform action is bound to start event, because in that case, fzf can't be sure of the input type.
  • Added --header-lines-border to display header from --header-lines with a separate border

Use --header-lines-border to separate two headers

ps -ef | fzf --style full --layout reverse --header-lines 1
--bind 'ctrl-r:reload(ps -ef)' --header 'Press CTRL-R to reload'
--header-lines-border bottom --no-list-border

- `click-header` event now sets `$FZF_CLICK_HEADER_WORD` and `$FZF_CLICK_HEADER_NTH`. You can use them to implement a clickable header for changing the search scope using the new `transform-nth` action.
```sh
### Click on the header line to limit search scope
ps -ef | fzf --style full --layout reverse --header-lines 1 \
             --header-lines-border bottom --no-list-border \
             --color fg:dim,nth:regular \
             --bind 'click-header:transform-nth(
                       echo $FZF_CLICK_HEADER_NTH
                     )+transform-prompt(
                       echo "$FZF_CLICK_HEADER_WORD> "
                     )'
- `$FZF_KEY` was updated to expose the type of the click. e.g. `click`, `ctrl-click`, etc. You can use it to implement a more sophisticated behavior.
- `kill` completion for bash and zsh were updated to use this feature
  • Added --no-input option to completely disable and hide the input section

Click header to trigger search

fzf --header '[src] [test]' --no-input --layout reverse
--header-border bottom --input-border
--bind 'click-header:transform-search:echo ${FZF_CLICK_HEADER_WORD:1:-1}'

Vim-like mode switch

fzf --layout reverse-list --no-input
--bind 'j:down,k:up,/:show-input+unbind(j,k,/)'
--bind 'enter,esc,ctrl-c:transform:
if [[ $FZF_INPUT_STATE = enabled ]]; then
echo "rebind(j,k,/)+hide-input"
elif [[ $FZF_KEY = enter ]]; then
echo accept
else
echo abort
fi
'

  - You can later show the input section using `show-input` or `toggle-input` action, and hide it again using `hide-input`, or `toggle-input`.
- Extended `{q}` placeholder to support ranges. e.g. `{q:1}`, `{q:2..}`, etc.
- Added `search(...)` and `transform-search(...)` action to trigger an fzf search with an arbitrary query string. This can be used to extend the search syntax of fzf. In the following example, fzf will use the first word of the query to trigger ripgrep search, and use the rest of the query to perform fzf search within the result.
```sh
export TEMP=$(mktemp -u)
trap 'rm -f "$TEMP"' EXIT

TRANSFORMER='
  rg_pat={q:1}      # The first word is passed to ripgrep
  fzf_pat={q:2..}   # The rest are passed to fzf

  if ! [[ -r "$TEMP" ]] || [[ $rg_pat != $(cat "$TEMP") ]]; then
    echo "$rg_pat" > "$TEMP"
    printf "reload:sleep 0.1; rg --column --line-number --no-heading --color=always --smart-case %q || true" "$rg_pat"
  fi
  echo "+search:$fzf_pat"
'
fzf --ansi --disabled \
  --with-shell 'bash -c' \
  --bind "start,change:transform:$TRANSFORMER"
  • You can now bind actions to multiple keys and events at once by writing a comma-separated list of keys and events before the colon

Load 'ps -ef' output on start and reload it on CTRL-R

fzf --bind 'start,ctrl-r:reload:ps -ef'

- `--min-height` option now takes a number followed by `+`, which tells fzf to show at least that many items in the list section. The default value is now changed to `10+`.
```sh
### You will only see the input section which takes 3 lines
fzf --style=full --height 1% --min-height 3
### You will see 3 items in the list section
fzf --style full --height 1% --min-height 3+
- Shell integration scripts were updated to use `--min-height 20+` by default
  • --header-lines will be displayed at the top in reverse-list layout
  • Added bell action to ring the terminal bell

Press CTRL-Y to copy the current line to the clipboard and ring the bell

fzf --bind 'ctrl-y:execute-silent(echo -n {} | pbcopy)+bell'

- Added `toggle-bind` action
- Bug fixes and improvements
- Fixed fish script to support fish 3.1.2 or later (@​bitraid)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link
Contributor

coderabbitai bot commented Feb 2, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Omochice Omochice merged commit 2c7af0e into main Feb 3, 2025
18 checks passed
@Omochice Omochice deleted the renovate/junegunn-fzf-0.x branch February 3, 2025 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant