Skip to content

Commit a0c17ea

Browse files
committed
add missing version info
1 parent f03861b commit a0c17ea

File tree

3 files changed

+26
-7
lines changed

3 files changed

+26
-7
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [0.1.2] - 2020-05-09
8+
9+
### Fixed
10+
Include missing version information
11+
12+
### Fixed
13+
* use `printf` instead of `clear` to clear the screen
14+
715
## [0.1.1] - 2020-05-09
816

917
### Fixed

bashcards

+12-4
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,20 @@ set -eou pipefail
77

88
pname="bashcards"
99
ext="bcrds"
10+
version="0.1.2"
11+
12+
function version {
13+
echo "$version"
14+
return 0
15+
}
1016

1117
function usage {
1218
cat <<EOF
1319
Usage: $pname [OPTION...]
1420
15-
-d, --dir DIRECTORY Specify directory with *.$ext files
21+
-d, --dir DIRECTORY Directory containing *.$ext files
1622
-h, --help See this help information
23+
-v, --version Current version
1724
EOF
1825

1926
return 0
@@ -208,7 +215,8 @@ function start {
208215
# Determine command
209216

210217
case "$1" in
211-
-d|--dir ) [[ ! -n "${2-}" ]] && dir_not_found; start $2;;
212-
-h|--help) usage;;
213-
*) unknown-cmd;;
218+
-d|--dir ) [[ ! -n "${2-}" ]] && dir_not_found; start $2;;
219+
-h|--help ) usage;;
220+
-v|--version) version;;
221+
*) unknown-cmd;;
214222
esac

bashcards.8

+6-3
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@
44
.SH NAME
55
bashcards \- Practice flashcards in bash
66
.SH SYNOPSIS
7-
bashcards [-d directory] [-h|--help]
7+
bashcards [-v,--version] [-h|--help] [-d directory]
88
.SH DESCRIPTION
99
bashcards is a bash program for practicing flashcards in bash.
1010
.SH OPTIONS
1111
.TP
12-
.BR -d, --dir
12+
.BR -d,--dir
1313
Directory containing bashcard files (*.bcrds). Each file should contain a group
1414
of bashcards (one per line) formatted as front=back. If not provided, default
1515
bashcard values will be used.
1616
.TP
17-
.BR -h, --help
17+
.BR -h,--help
1818
See this help information
19+
.TP
20+
.BR -v,--version
21+
Current version
1922
.SH BUGS
2023
No known bugs.
2124
.SH AUTHOR

0 commit comments

Comments
 (0)