1
0
Fork 0
mirror of https://git.sr.ht/~rjarry/aerc synced 2025-09-18 09:02:49 +02:00
aerc/config/cmds.go
Erin John f0769d3309 compose: read VISUAL before EDITOR
Historically UNIX programs read VISUAL before EDITOR. The former
is to be set to a screen editor like 'vi' and the latter to a line
editor like 'ed'.

Aerc should correctly read VISUAL first if both are defined.

Signed-off-by: Erin John <unrealapex@disroot.org>
Acked-by: Robin Jarry <robin@jarry.cc>
2025-08-04 12:47:07 +02:00

23 lines
272 B
Go

package config
import (
"os"
)
func EditorCmds() []string {
return []string{
Compose.Editor,
os.Getenv("VISUAL"),
os.Getenv("EDITOR"),
"vi",
"nano",
}
}
func PagerCmds() []string {
return []string{
Viewer.Pager,
os.Getenv("PAGER"),
"less -Rc",
}
}