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

10
esv.d
View file

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