diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2025-01-13 00:13:31 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2025-01-13 00:13:31 +0900 |
| commit | d83eb2800a09d86e17c0339d86bd1f22f68164a8 (patch) | |
| tree | 0be6b9c97bf9f8434a367fe2996b82f4b4e36f95 /src/options.go | |
| parent | 6f943112a9998d504a5660754f400786e79f80b2 (diff) | |
| download | fzf-d83eb2800a09d86e17c0339d86bd1f22f68164a8.tar.gz | |
Add change-nth action
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
Diffstat (limited to 'src/options.go')
| -rw-r--r-- | src/options.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/options.go b/src/options.go index ac4a1aca..3932cb56 100644 --- a/src/options.go +++ b/src/options.go @@ -1306,7 +1306,7 @@ const ( func init() { executeRegexp = regexp.MustCompile( - `(?si)[:+](become|execute(?:-multi|-silent)?|reload(?:-sync)?|preview|(?:change|transform)-(?:query|prompt|(?:border|list|preview|input|header)-label|header)|transform|change-(?:preview-window|preview|multi)|(?:re|un)bind|pos|put|print)`) + `(?si)[:+](become|execute(?:-multi|-silent)?|reload(?:-sync)?|preview|(?:change|transform)-(?:query|prompt|(?:border|list|preview|input|header)-label|header)|transform|change-(?:preview-window|preview|multi|nth)|(?:re|un)bind|pos|put|print)`) splitRegexp = regexp.MustCompile("[,:]+") actionNameRegexp = regexp.MustCompile("(?i)^[a-z-]+") } @@ -1684,6 +1684,8 @@ func isExecuteAction(str string) actionType { return actChangeQuery case "change-multi": return actChangeMulti + case "change-nth": + return actChangeNth case "pos": return actPosition case "execute": |
