0.52.0
junegunn/fzf0.52.0May 7, 2024by junegunn
Upgrading?
Release notes summary
Introduced visual enhancements like full line highlighting and color customization for selected lines, along with a new click-header event and environment variables for completion customization.
Key Highlights
- Added `--highlight-line` to highlight the whole current line.
- Added color names for selected lines: `selected-fg`, `selected-bg`, and `selected-hl`.
- Added `click-header` event with `$FZF_CLICK_HEADER_COLUMN` and `$FZF_CLICK_HEADER_LINE` variables.
- Added `$FZF_COMPLETION_{DIR,PATH}_OPTS` for separately customizing directory and path completion.
- Refactored code to allow using fzf as a library in Go programs.
New Features
- --highlight-line
- selected-fg, selected-bg, selected-hl colors
- click-header event
- $FZF_COMPLETION_DIR_OPTS
- $FZF_COMPLETION_PATH_OPTS
Full Release Notes
- Added `--highlight-line` to highlight the whole current line (à la `set cursorline` of Vim)
- Added color names for selected lines: `selected-fg`, `selected-bg`, and `selected-hl`
```sh
fzf --border --multi --info inline-right --layout reverse --marker ▏ --pointer ▌ --prompt '▌ ' \
--highlight-line --color gutter:-1,selected-bg:238,selected-fg:146,current-fg:189
```
<img width="777" alt="image" src="https://github.com/junegunn/fzf/assets/700826/fd8a2728-2fcb-4a88-a76d-7984e79ab510">
- Added `click-header` event that is triggered when the header section is clicked. When the event is triggered, `$FZF_CLICK_HEADER_COLUMN` and `$FZF_CLICK_HEADER_LINE` are set.
```sh
fd --type f |
fzf --header $'[Files] [Directories]' --header-first \
--bind 'click-header:transform:
(( FZF_CLICK_HEADER_COLUMN <= 7 )) && echo "reload(fd --type f)"
(( FZF_CLICK_HEADER_COLUMN >= 9 )) && echo "reload(fd --type d)"
'
```
- Added `$FZF_COMPLETION_{DIR,PATH}_OPTS` for separately customizing the behavior of directory and path completion
```sh
# Set --walker options without 'follow' not to follow symbolic links
FZF_COMPLETION_PATH_OPTS="--walker=file,dir,hidden"
FZF_COMPLETION_DIR_OPTS="--walker=dir,hidden"
```
- Fixed Windows argument escaping
- Bug fixes and improvements
- The code was heavily refactored to allow using fzf as a library in Go programs. The API is still experimental and subject to change.
- https://gist.github.com/junegunn/193990b65be48a38aac6ac49d5669170
Related Repositories
ollama/ollama★ 184,711
Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
fatedier/frp★ 110,124
A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.
infiniflow/ragflow★ 92,830
RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs
gohugoio/hugo★ 90,227
The world’s fastest framework for building websites.
caddyserver/caddy★ 78,391
Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS