aboutsummaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2024-06-27 00:28:18 +0200
committerRobin Jarry <robin@jarry.cc>2024-06-28 23:28:53 +0200
commitc15c265f7bcd6b0568b9d259673b7f302602f250 (patch)
treec9a625ca3ddc10eda1650a0aafdfaebd055afcb3 /main.go
parent8e1f1dc199e1ea05cfd1319aa9338609e3ab3af6 (diff)
downloadaerc-c15c265f7bcd6b0568b9d259673b7f302602f250.tar.gz
main: add aliases for flags and options
Add --help and --version as aliases of -h and -v, respectively. Also add short flags for other options. Reported-by: Peter Sanchez <pjs@petersanchez.com> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Diffstat (limited to 'main.go')
-rw-r--r--main.go32
1 files changed, 18 insertions, 14 deletions
diff --git a/main.go b/main.go
index 40ce3cb8..123d360d 100644
--- a/main.go
+++ b/main.go
@@ -96,13 +96,13 @@ func buildInfo() string {
}
type Opts struct {
- Help bool `opt:"-h" action:"ShowHelp"`
- Version bool `opt:"-v" action:"ShowVersion"`
- Accounts []string `opt:"-a" action:"ParseAccounts" metavar:"<account>"`
- ConfAerc string `opt:"--aerc-conf"`
- ConfAccounts string `opt:"--accounts-conf"`
- ConfBinds string `opt:"--binds-conf"`
- NoIPC bool `opt:"--no-ipc"`
+ Help bool `opt:"-h,--help" action:"ShowHelp"`
+ Version bool `opt:"-v,--version" action:"ShowVersion"`
+ Accounts []string `opt:"-a,--account" action:"ParseAccounts" metavar:"<name>"`
+ ConfAerc string `opt:"-C,--aerc-conf" metavar:"<file>"`
+ ConfAccounts string `opt:"-A,--accounts-conf" metavar:"<file>"`
+ ConfBinds string `opt:"-B,--binds-conf" metavar:"<file>"`
+ NoIPC bool `opt:"-I,--no-ipc"`
Command []string `opt:"..." required:"false" metavar:"mailto:<address> | mbox:<file> | :<command...>"`
}
@@ -113,16 +113,20 @@ Aerc is an email client for your terminal.
Options:
- -h Show this help message and exit.
- -v Print version information.
- -a <account> Load only the named account, as opposed to all configured
+ -h, --help Show this help message and exit.
+ -v, --version Print version information.
+ -a <name>, --account <name>
+ Load only the named account, as opposed to all configured
accounts. It can also be a comma separated list of names.
This option may be specified multiple times. The account
order will be preserved.
- --aerc-conf Path to configuration file to be used instead of the default.
- --accounts-conf Path to configuration file to be used instead of the default.
- --binds-conf Path to configuration file to be used instead of the default.
- --no-ipc Run any commands in this aerc instance, and don't create a
+ -C <file>, --aerc-conf <file>
+ Path to configuration file to be used instead of the default.
+ -A <file>, --accounts-conf <file>
+ Path to configuration file to be used instead of the default.
+ -B <file>, --binds-conf <file>
+ Path to configuration file to be used instead of the default.
+ -I, --no-ipc Run any commands in this aerc instance, and don't create a
socket for other aerc instances to communicate with this one.
mailto:<address> Open the composer with the address(es) in the To field.
If aerc is already running, the composer is started in