From c063b1d5f38ae144b7c86fe450a58f5f0ead667b Mon Sep 17 00:00:00 2001 From: Koni Marti Date: Sun, 20 Nov 2022 16:22:39 +0100 Subject: attach: open file picker menu with -m flag Open a user-defined file picker with the -m flag for the attach command to select attachments. Specify your file picker of choice with the 'file-picker-cmd' in the [composer] section of aerc.conf, e.g. "file-picker-cmd=fzf -m". A '%s' placeholder can be used in the 'file-picker-cmd' which is then substituted for the argument provided to :attach -m . For example, when you set 'file-picker-cmd=find %s -type f | fzf -m', you can easily change the directory to start the search with ':attach -m '. Tested with fzf, fzy and peco. Implements: https://todo.sr.ht/~rjarry/aerc/108 Signed-off-by: Koni Marti Acked-by: Tim Culverhouse --- config/compose.go | 1 + 1 file changed, 1 insertion(+) (limited to 'config/compose.go') diff --git a/config/compose.go b/config/compose.go index 31ee0a8b..f9c1ba90 100644 --- a/config/compose.go +++ b/config/compose.go @@ -14,6 +14,7 @@ type ComposeConfig struct { AddressBookCmd string `ini:"address-book-cmd"` ReplyToSelf bool `ini:"reply-to-self"` NoAttachmentWarning *regexp.Regexp `ini:"-"` + FilePickerCmd string `ini:"file-picker-cmd"` } func defaultComposeConfig() ComposeConfig { -- cgit