diff options
author | Koni Marti <koni.marti@gmail.com> | 2023-11-24 16:03:03 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-12-30 15:42:09 +0100 |
commit | cf47763e5582563f712b4a40a9b299378aba9003 (patch) | |
tree | af83b863a644a90a69eef891a4ce06023224a213 /config | |
parent | fdd9f7991aa50bd99d21c178a2816fc075eead6b (diff) | |
download | aerc-cf47763e5582563f712b4a40a9b299378aba9003.tar.gz |
patch/list: add list sub-cmd
Implement the :patch list command. List the the current project and add
a flag to list all saved projects. Use the pager to display the data and
extract the pager commands and move them into the config package.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'config')
-rw-r--r-- | config/cmds.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/config/cmds.go b/config/cmds.go new file mode 100644 index 00000000..16208914 --- /dev/null +++ b/config/cmds.go @@ -0,0 +1,22 @@ +package config + +import ( + "os" +) + +func EditorCmds() []string { + return []string{ + Compose.Editor, + os.Getenv("EDITOR"), + "vi", + "nano", + } +} + +func PagerCmds() []string { + return []string{ + Viewer.Pager, + os.Getenv("PAGER"), + "less -Rc", + } +} |