m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-19 09:03:43 -05:00

ADD $FZF_DIRECTION

This commit is contained in:
Junegunn Choi
2025-10-04 22:50:33 +09:00
parent e1de29bc40
commit 9ace1351ff
4 changed files with 22 additions and 0 deletions

View File

@@ -132,6 +132,20 @@ fzf --gutter ' ' --color gutter:reverse
As noted above, the `--gutter-raw CHAR` option was also added for customizing the gutter column in raw mode.
### Added environment variable
`$FZF_DIRECTION` is now exported to child processes, indicating the list direction of the current layout.
- `up` for the default layout
- `down` for `reverse` or `reverse-list`
This simplifies writing transform actions involving layout-dependent actions
like `{up,down}-match`, `{up,down}-selected`, and `toggle+{up,down}`.
```sh
fzf --raw --bind 'result:first+transform:[[ $FZF_RAW = 0 ]] && echo $FZF_DIRECTION-match'
```
### Breaking changes
#### Hiding the gutter column