summaryrefslogtreecommitdiffstats
path: root/src/options.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2022-12-28 00:05:31 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2022-12-28 00:05:31 +0900
commit36d2bb332b87900e8178f2ec54d2cfda07f075db (patch)
tree1a5573e489b3b962920ae91ea5df374b0d1e204b /src/options.go
parent4dbe45640a46a67e2c46fcd0f6257e078b6817c1 (diff)
Add transform-query(...) action
Test case authored by @SpicyLemon Close #1930 Close #2465 Close #2559 Close #2509 (e.g. fzf --bind 'space:transform-query:printf %s%s {q} {}')
Diffstat (limited to 'src/options.go')
-rw-r--r--src/options.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/options.go b/src/options.go
index f25b6e73..1288fbe4 100644
--- a/src/options.go
+++ b/src/options.go
@@ -890,7 +890,7 @@ const (
func init() {
executeRegexp = regexp.MustCompile(
- `(?si)[:+](execute(?:-multi|-silent)?|reload|preview|change-query|change-prompt|change-preview-window|change-preview|(?:re|un)bind|pos|put)`)
+ `(?si)[:+](execute(?:-multi|-silent)?|reload|preview|change-query|change-prompt|change-preview-window|change-preview|(?:re|un)bind|pos|put|transform-query)`)
splitRegexp = regexp.MustCompile("[,:]+")
actionNameRegexp = regexp.MustCompile("(?i)^[a-z-]+")
}
@@ -1207,6 +1207,8 @@ func isExecuteAction(str string) actionType {
return actExecuteMulti
case "put":
return actPut
+ case "transform-query":
+ return actTransformQuery
}
return actIgnore
}