Skip to content

Commit

Permalink
add missing version info
Browse files Browse the repository at this point in the history
  • Loading branch information
rpearce committed May 9, 2020
1 parent f03861b commit a0c17ea
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [0.1.2] - 2020-05-09

### Fixed
Include missing version information

### Fixed
* use `printf` instead of `clear` to clear the screen

## [0.1.1] - 2020-05-09

### Fixed
Expand Down
16 changes: 12 additions & 4 deletions bashcards
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,20 @@ set -eou pipefail

pname="bashcards"
ext="bcrds"
version="0.1.2"

function version {
echo "$version"
return 0
}

function usage {
cat <<EOF
Usage: $pname [OPTION...]
-d, --dir DIRECTORY Specify directory with *.$ext files
-d, --dir DIRECTORY Directory containing *.$ext files
-h, --help See this help information
-v, --version Current version
EOF

return 0
Expand Down Expand Up @@ -208,7 +215,8 @@ function start {
# Determine command

case "$1" in
-d|--dir ) [[ ! -n "${2-}" ]] && dir_not_found; start $2;;
-h|--help) usage;;
*) unknown-cmd;;
-d|--dir ) [[ ! -n "${2-}" ]] && dir_not_found; start $2;;
-h|--help ) usage;;
-v|--version) version;;
*) unknown-cmd;;
esac
9 changes: 6 additions & 3 deletions bashcards.8
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@
.SH NAME
bashcards \- Practice flashcards in bash
.SH SYNOPSIS
bashcards [-d directory] [-h|--help]
bashcards [-v,--version] [-h|--help] [-d directory]
.SH DESCRIPTION
bashcards is a bash program for practicing flashcards in bash.
.SH OPTIONS
.TP
.BR -d, --dir
.BR -d,--dir
Directory containing bashcard files (*.bcrds). Each file should contain a group
of bashcards (one per line) formatted as front=back. If not provided, default
bashcard values will be used.
.TP
.BR -h, --help
.BR -h,--help
See this help information
.TP
.BR -v,--version
Current version
.SH BUGS
No known bugs.
.SH AUTHOR
Expand Down

0 comments on commit a0c17ea

Please sign in to comment.