diff options
-rwxr-xr-x | wd | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 "$@";; |