Junegunn Choi
84e2262ad6
Make --accept-nth and --with-nth support templates
2025-02-12 20:15:04 +09:00
Junegunn Choi
a2420026ab
Rename actions: exclude and exclude-multi
...
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
https://github.com/junegunn/fzf/pull/4231#issuecomment-2646067669
2025-02-09 13:52:20 +09:00
Junegunn Choi
1be1991299
Add exclude-current action
...
https://github.com/junegunn/fzf/pull/4231#issuecomment-2646063208
2025-02-09 13:37:22 +09:00
Junegunn Choi
67dd7e1923
Add 'exclude' action for excluding current/selected items from the result ( #4231 )
...
Close #4185
2025-02-09 13:22:33 +09:00
Junegunn Choi
2b584586ed
Add --accept-nth option to transform the output
...
This option can be used to replace a sed or awk in the post-processing step.
ps -ef | fzf --multi --header-lines 1 | awk '{print $2}'
ps -ef | fzf --multi --header-lines 1 --accept-nth 2
This may not be a very "Unix-y" thing to do, so I've always felt that fzf
shouldn't have such an option, but I've finally changed my mind because:
* fzf can be configured with a custom delimiter that is a fixed string
or a regular expression.
* In such cases, you'd need to repeat the delimiter again in the
post-processing step.
* Also, tools like awk or sed may interpret a regular expression
differently, causing mismatches.
You can still use sed, cut, or awk if you prefer.
Close #3987
Close #1323
2025-02-09 11:53:35 +09:00
Junegunn Choi
32234be7a2
FZF_KEY enhancements
...
* 'enter' instead of 'ctrl-m'
* 'space' instead of ' '
2025-02-02 02:23:47 +09:00
Junegunn Choi
18cbb4a84d
Display header lines at the top in 'reverse-list' layout
2025-02-01 17:03:59 +09:00
Junegunn Choi
e84afe196a
Add {show,hide,toggle}-input and expose $FZF_INPUT_STATE
2025-02-01 17:03:59 +09:00
Junegunn Choi
e1e171a3c4
Add toggle-bind
2025-02-01 17:03:59 +09:00
Junegunn Choi
6c0ca4a64a
Add --no-input to hide the input section ( #4210 )
...
CodeQL / Analyze (go) (push) Has been cancelled
Test fzf on Linux / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Close #2890
Close #1396
You can't type in queries in this mode, and the only way to trigger an
fzf search is to use `search(...)` action.
# 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}'
2025-01-30 00:50:46 +09:00
Junegunn Choi
eb0257d48f
Enhance --min-height option to take number followed by +
2025-01-28 18:34:12 +09:00
Junegunn Choi
51c207448d
Set the default value of --min-height depending on other options
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
2025-01-27 20:33:47 +09:00
Junegunn Choi
8179ca5eaa
Fix edge cases in --bind where ',' or ':' are chained ( #4206 )
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
2025-01-27 09:30:53 +09:00
Junegunn Choi
80da0776f8
Allow actions to multiple keys and events at once
...
Close #4206
2025-01-27 01:46:21 +09:00
Junegunn Choi
d6584543e9
Make click-header export $FZF_CLICK_HEADER_{NTH,WORD}
2025-01-26 15:37:42 +09:00
Junegunn Choi
7220d8233e
Add 'search' and 'transform-search'
...
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
Generate Sponsors README / deploy (push) Has been cancelled
Close #4202
2025-01-26 01:50:08 +09:00
Junegunn Choi
04017c25bb
Add 'bell' action to ring the terminal bell
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
2025-01-25 11:22:32 +09:00
Junegunn Choi
243a76002c
Option to prioritize file name matches ( #4192 )
...
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
* 'pathname' is a new tiebreak option for prioritizing matches occurring
in the file name of the path.
* `--scheme=path` will automatically set `--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.
Close #4191
2025-01-24 00:54:53 +09:00
Junegunn Choi
06547d0cbe
Add --header-lines-border to separate two headers
...
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
Examples:
# Border only around the header from --header-lines
seq 10 | fzf --header 'hello' --header-lines 2 --header-lines-border
# Both headers with borders
seq 10 | fzf --header 'hello' --header-lines 2 --header-border --header-lines-border
# Use 'none' to still separate two headers but without a border
seq 10 | fzf --header 'hello' --header-lines 2 --header-border --header-lines-border none --list-border
2025-01-23 01:39:57 +09:00
Junegunn Choi
a4db8bd7b5
Make 'current-fg' inherit from 'fg' to simplify configuration
...
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
If you do not want 'current-fg' to inherit attributes of 'fg', prefix it
with 'regular:' to reset them.
# italic and underline
fzf --color fg:italic,current-fg:underline
# only underline
fzf --color fg:italic,current-fg:regular:underline
2025-01-20 01:02:58 +09:00
Junegunn Choi
c1875af70b
Add 'gap-line' color for the horizontal line on each gap
...
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
Generate Sponsors README / deploy (push) Has been cancelled
Color inheritance: border >> list-border >> gap-line
2025-01-18 13:48:46 +09:00
Junegunn Choi
0d5aebb806
Allow setting border styles at once with --style full:STYLE
2025-01-17 13:12:51 +09:00
Junegunn Choi
3e7f032ec2
Allow displaying --nth parts in a different text style
...
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
Close #4183
2025-01-16 01:38:45 +09:00
Junegunn Choi
b42f5bfb19
Add --gap-line to --help output and man page
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
2025-01-15 23:40:42 +09:00
Junegunn Choi
9d6637c1b3
Add gap line
...
Close #4182
2025-01-15 22:23:52 +09:00
Junegunn Choi
d83eb2800a
Add change-nth action
...
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
Example:
# Start with --nth 1, then 2, then 3, then back to the default, 1
echo 'foo foobar foobarbaz' | fzf --bind 'space:change-nth(2|3|)' --nth 1 -q foo
Close #4172
Close #3109
2025-01-13 00:13:31 +09:00
Junegunn Choi
5460517bd2
Treat a single-character delimiter as a plain string delimiter
...
even if it's a regular expression meta-character
Close #4170
2025-01-12 10:23:43 +09:00
Junegunn Choi
4fdc07927f
Refactor --preview-border=line
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
Generate Sponsors README / deploy (push) Has been cancelled
2025-01-11 19:34:26 +09:00
Junegunn Choi
43eafdf4b7
Fix preview scrollbar with '--preview-window bottom,border-line'
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
2025-01-11 00:53:07 +09:00
Junegunn Choi
fa3f706e71
Refactor option parser
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
2025-01-07 19:16:41 +09:00
Junegunn Choi
a30181e240
Update man page sections
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
2025-01-07 00:20:36 +09:00
Junegunn Choi
88d768bf6b
Restructure --help output
2025-01-06 23:34:14 +09:00
Junegunn Choi
5ae60e2e80
Add style presets: --style=[default|minimal|full]
...
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
Close #4160
2025-01-06 02:10:44 +09:00
Junegunn Choi
0e0b868342
Add preview border style 'line'
...
It draws a single line between the preview window and the rest of the
interface. i.e. automatically choose between 'left', 'right', 'top', and
'bottom' depending on the position of the preview window.
2025-01-06 00:44:59 +09:00
Junegunn Choi
a5beb08ed7
Border around the header section
...
Close #4159
2025-01-05 23:02:52 +09:00
Junegunn Choi
8a71e091a8
Fix '--tmux border-native'
2025-01-04 18:47:00 +09:00
Andreas Auernhammer
120cd7f25a
Add border-native option to --tmux flag ( #4157 )
...
This commit adds the `border-native` resulting in the following:
```
--tmux[=[center|top|bottom|left|right][,SIZE[%]][,SIZE[%]][,border-native]]
```
By default, when not specified, the `-B` flag is passed to the
`tmux popup-window` command such that no border is drawn around
the tmux popup window.
When the `border-native` option is present, the `-B` flag is omitted
and the popup window is drawn using the border style configured in
the tmux config file.
Fixes #4156
Signed-off-by: Andreas Auernhammer <github@aead.dev >
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com >
2025-01-04 18:30:32 +09:00
Junegunn Choi
c2e1861747
Update --help output
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
2025-01-02 23:54:59 +09:00
Junegunn Choi
ee3916be17
Border around the input section (prompt + info)
...
Close #4154
2025-01-02 16:25:00 +09:00
Junegunn Choi
fd513f8af8
Add missing --list-border=* parser
...
CodeQL / Analyze (go) (push) Has been cancelled
Test fzf on Linux / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Patch suggested by @bitraid
2024-12-31 19:39:46 +09:00
Junegunn Choi
9a2b7f559c
Add --list-border for additional border around the list section
...
Close #4148
2024-12-31 17:05:14 +09:00
Junegunn Choi
ca5e633399
Add toggle-hscroll
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
2024-12-19 21:05:26 +09:00
Junegunn Choi
e60a9a628b
Add toggle-multi-line action
2024-12-19 21:05:26 +09:00
Junegunn Choi
da9179335c
Respect the properties of the currently active preview window options
2024-12-12 13:53:08 +09:00
msabathier
bee80a730f
Allow walking multiple root directories ( #4109 )
...
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
Co-authored-by: Martin Sabathier <martin.sabathier.ext@corys.fr >
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com >
2024-11-25 19:25:30 +09:00
jaydee-coder
d4d9b99879
Allow specifying '{n}' as the OFFSET in the preview-window flag ( #4079 )
...
CodeQL / Analyze (go) (push) Has been cancelled
Test fzf on Linux / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
* fzf: Allow '{n}' to be used as the OFFSET in the preview-window flag
* man: Document using '{n}' as the OFFSET in the preview-window flag
2024-11-04 22:27:59 +09:00
Junegunn Choi
1a32220ca9
Add --gap option to put empty lines between items
2024-10-01 19:15:17 +09:00
Junegunn Choi
2191a44e36
Redraw/hide scroll offset when 'info' property is changed
CodeQL / Analyze (go) (push) Has been cancelled
Test fzf on Linux / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Generate Sponsors README / deploy (push) Has been cancelled
2024-09-12 22:04:19 +09:00
Junegunn Choi
952276dc2d
Add 'noinfo' option to hide scroll offset information in preview window
...
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
fzf --preview 'seq 1000' --preview-window noinfo
Close #2525
2024-09-12 18:31:14 +09:00
Junegunn Choi
e0924d27b8
Change default --ellipsis to '··'
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
2024-08-27 19:41:39 +09:00