esv: rename -C flag to -c

The capital C flag is often associated with changing directories. The tar
and make programs use it this way.
This commit is contained in:
Jeremy Baxter 2024-06-26 09:40:51 +12:00
parent f540160ff3
commit 8f699c3212
2 changed files with 8 additions and 8 deletions

6
esv.1
View file

@ -1,4 +1,4 @@
.Dd $Mdocdate: June 25 2024 $
.Dd $Mdocdate: June 26 2024 $
.Dt ESV 1
.Os
.Sh NAME
@ -8,7 +8,7 @@
.Nm esv
.Bk -words
.Op Fl aFfHhNnRrV
.Op Fl C Ar config
.Op Fl c Ar config
.Op Fl l Ar length
.Op Fl s Ar query
.Ar book verses
@ -51,7 +51,7 @@ The options are as follows:
.Bl -tag -width 123456
.It Fl a
Play a recorded audio track rather than showing a passage.
.It Fl C Ar configfile
.It Fl c Ar configfile
Read the configuration from the path
.Ar configfile .
This overrides the

10
esv.d
View file

@ -38,7 +38,7 @@ import cf = config;
@safe:
bool aFlag; /* audio */
string CFlag; /* config */
string cFlag; /* config path */
bool fFlag, FFlag; /* footnotes */
bool hFlag, HFlag; /* headings */
int lFlag; /* line length */
@ -65,7 +65,7 @@ main(string[] args)
config.bundling,
config.caseSensitive,
"a", &aFlag,
"C", &CFlag,
"c", &cFlag,
"F", &FFlag, "f", &fFlag,
"H", &HFlag, "h", &hFlag,
"l", &onLineLength,
@ -90,7 +90,7 @@ main(string[] args)
if (args.length < 3) {
stderr.writefln(
"usage: %s [-aFfHhNnRrV] [-C config] [-l length] [-s query] book verses",
"usage: %s [-aFfHhNnRrV] [-c config] [-l length] [-s query] book verses",
baseName(args[0]));
return 1;
}
@ -106,8 +106,8 @@ config:
configPath = environment.get(cf.configEnv, cf.configPath)
.expandTilde();
try {
if (CFlag != "") { /* if -C was given */
configPath = CFlag.expandTilde();
if (cFlag != "") { /* if -c was given */
configPath = cFlag.expandTilde();
} else {
if (!configPath.exists()) {
mkdirRecurse(dirName(configPath));