aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorinwit <inwit@sindominio.net>2022-01-31 17:32:19 +0100
committerRobin Jarry <robin@jarry.cc>2022-01-31 17:51:57 +0100
commite0b5f2e08cd766258bdfd5eb392690768d2f5964 (patch)
treeea0abbcc5fa9358f215b1951f9b23b05a2794a67 /config
parent27122ef8e885f6824afd395c0c0b7b4f19f71b21 (diff)
downloadaerc-e0b5f2e08cd766258bdfd5eb392690768d2f5964.tar.gz
completions: add folder flexible search as an option
Provide an option to change the completion style when selecting a folder from completing with folders starting with the input string to completing with folders in which the input string is a substring present at any point in the folder name. References: https://lists.sr.ht/~sircmpwn/aerc/%3C20201129181020.186984-1-inwit%40sindominio.net%3E References: https://lists.sr.ht/~sircmpwn/aerc/%3C20210223202536.199355-1-clayton%40craftyguy.net%3E Signed-off-by: inwit <inwit@sindominio.net>
Diffstat (limited to 'config')
-rw-r--r--config/aerc.conf.in4
-rw-r--r--config/config.go2
2 files changed, 6 insertions, 0 deletions
diff --git a/config/aerc.conf.in b/config/aerc.conf.in
index 87f7e563..98cd679c 100644
--- a/config/aerc.conf.in
+++ b/config/aerc.conf.in
@@ -112,6 +112,10 @@ stylesets-dirs=@SHAREDIR@/stylesets/
# Default: default
styleset-name=default
+# Activates fuzzy search for IMAP folders: the typed string is search in the
+# folder tree in any position, not necessarily at the beginning.
+#fuzzy-folder-complete=false
+
#[ui:account=foo]
#
# Enable threading in the ui. Only works with notmuch:// and imap:// accounts
diff --git a/config/config.go b/config/config.go
index 8d818c26..185a14c0 100644
--- a/config/config.go
+++ b/config/config.go
@@ -43,6 +43,7 @@ type UIConfig struct {
EmptyDirlist string `ini:"empty-dirlist"`
MouseEnabled bool `ini:"mouse-enabled"`
ThreadingEnabled bool `ini:"threading-enabled"`
+ FuzzyFolderComplete bool `ini:"fuzzy-folder-complete"`
NewMessageBell bool `ini:"new-message-bell"`
Spinner string `ini:"spinner"`
SpinnerDelimiter string `ini:"spinner-delimiter"`
@@ -563,6 +564,7 @@ func LoadConfigFromFile(root *string, sharedir string, logger *log.Logger) (*Aer
EmptyDirlist: "(no folders)",
MouseEnabled: false,
NewMessageBell: true,
+ FuzzyFolderComplete: false,
Spinner: "[..] , [..] , [..] , [..] , [..], [..] , [..] , [..] ",
SpinnerDelimiter: ",",
DirListFormat: "%n %>r",