aboutsummaryrefslogtreecommitdiffstats
path: root/commands/exec.go
diff options
context:
space:
mode:
authorKoni Marti <koni.marti@gmail.com>2023-05-10 23:56:24 +0200
committerRobin Jarry <robin@jarry.cc>2023-05-16 13:39:47 +0200
commit20747fcf104aa05bdc4d7d2b12a2488940bcae2f (patch)
tree6303754ac9830ff9bd8254b6641f98150e117afc /commands/exec.go
parent5c9d22bb84eb8a6ddd4477bae3c081964d6e7b51 (diff)
downloadaerc-20747fcf104aa05bdc4d7d2b12a2488940bcae2f.tar.gz
commands: expand and complete template code
Expand and complete template code. The exline does understand template code and can evaluate it. With this patch, the completion systems supports writing the templates by showing the available template data fields and template functions. Pressing <Tab> after }} will show the evaluated template in the completion menu. Complex template code, such as if-else statements work as well. Examples: :filter -f {{<Tab> will show the possible template data fields and functions :filter -f {{index (.To|email) 0}}<Tab> will show the value of the template expression in the completion list Pressing <Tab> twice after a completed template expression will substitute the expression with its value. :{{if match .Folder "INBOX"}}check-mail{{else}}cf INBOX{{end}} Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'commands/exec.go')
0 files changed, 0 insertions, 0 deletions