Skip to content

Commit 10bab78

Browse files
committed
Add version command
1 parent 6659892 commit 10bab78

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

notes

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env bash
22

3+
# Version
4+
notes_version="0.4.3"
5+
36
# Default Date string before config
47
QUICKNOTE_FORMAT="quicknote-%Y-%m-%d"
58
NOTES_EXT="md"
@@ -237,6 +240,13 @@ override this by setting \$NOTES_DIRECTORY to your preferred path.
237240
EOF
238241
}
239242

243+
version() {
244+
local name=$(basename $0)
245+
cat <<EOF
246+
$name $notes_version
247+
EOF
248+
}
249+
240250
main() {
241251
local ret=0
242252
local cmd=""
@@ -275,6 +285,9 @@ main() {
275285
--help | -help | -h )
276286
cmd="usage"
277287
;;
288+
--version | -version )
289+
cmd="version"
290+
;;
278291
* )
279292
printf "$1 is not a recognized notes command.\n\n"
280293
cmd="usage"

0 commit comments

Comments
 (0)