summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xwd6
1 files changed, 6 insertions, 0 deletions
diff --git a/wd b/wd
index 9a76b1e..1a2e1f2 100755
--- a/wd
+++ b/wd
@@ -7,6 +7,7 @@ PROGRAM="$(basename $0)"
WD_NOTES_DIR=${WD_NOTES_DIR:-"$HOME/notes"}
WD_JOURNALS_DIR=${WD_JOURNALS_DIR:-"$WD_NOTES_DIR/journals"}
+WD_DEFAULT_SUBCOMMAND=${WD_DEFAULT_SUBCOMMAND:-help}
year=$(date +%Y)
week_number=$(date +%W)
@@ -69,6 +70,11 @@ cmd_git () {
cd "$WD_NOTES_DIR" && git "$@"
}
+if [ "$#" -eq 0 ]; then
+ "$PROGRAM" "$WD_DEFAULT_SUBCOMMAND"
+ exit 0
+fi
+
case "$1" in
help|--help|-h) shift; cmd_usage "$@";;
version|--version|-v) shift; cmd_version "$@";;