Browse Source

Add support for -V for version (SemVer-formatted)

Alois Mahdal 7 years ago
parent
commit
224ef545c9
2 changed files with 3 additions and 3 deletions
  1. 2
    2
      src/saturnin.sh.skel
  2. 1
    1
      tests/cli/oracle/usage.stderr

+ 2
- 2
src/saturnin.sh.skel View File

279
         -v|--verbose)   export PRETTY_VERBOSE=true; shift ;;
279
         -v|--verbose)   export PRETTY_VERBOSE=true; shift ;;
280
         -h|--help)      saturnin__help;             exit  ;;
280
         -h|--help)      saturnin__help;             exit  ;;
281
         --version)      saturnin__version;          exit  ;;
281
         --version)      saturnin__version;          exit  ;;
282
-        --version-semver) saturnin__get app-version ;;
282
+        -V|--version-semver) saturnin__get app-version ;;
283
         --saturnin-get-*) saturnin__get "$1"        ;;
283
         --saturnin-get-*) saturnin__get "$1"        ;;
284
         -*)             saturnin__usage;            ;;
284
         -*)             saturnin__usage;            ;;
285
         --*)            saturnin__usage;            ;;
285
         --*)            saturnin__usage;            ;;
418
             "[options] COMMAND [ARG...]"                    \
418
             "[options] COMMAND [ARG...]"                    \
419
         -o                                                  \
419
         -o                                                  \
420
             "-D, --full-debug   turn on gory debugging"     \
420
             "-D, --full-debug   turn on gory debugging"     \
421
+            "-V, --version  show version and exit"          \
421
             "-d, --debug    turn on debugging"              \
422
             "-d, --debug    turn on debugging"              \
422
             "-h, --help     show this help message and exit"\
423
             "-h, --help     show this help message and exit"\
423
             "-v, --verbose  turn on verbosity"              \
424
             "-v, --verbose  turn on verbosity"              \
424
-            "--version      show version and exit"          \
425
         -c                                                  \
425
         -c                                                  \
426
             $(saturnin__lssc)
426
             $(saturnin__lssc)
427
 }
427
 }

+ 1
- 1
tests/cli/oracle/usage.stderr View File

3
 
3
 
4
 options:
4
 options:
5
   -D, --full-debug   turn on gory debugging
5
   -D, --full-debug   turn on gory debugging
6
+  -V, --version  show version and exit
6
   -d, --debug    turn on debugging
7
   -d, --debug    turn on debugging
7
   -h, --help     show this help message and exit
8
   -h, --help     show this help message and exit
8
   -v, --verbose  turn on verbosity
9
   -v, --verbose  turn on verbosity
9
-  --version      show version and exit
10
 
10
 
11
 commands:
11
 commands:
12
   bar
12
   bar