last.sh will exit 1 when no file found; handle it in next.sh. meaning um next works in empty dirs
This commit is contained in:
parent
b4a7b6a1b1
commit
cf6ff3349d
6 changed files with 47 additions and 19 deletions
7
shell/um
7
shell/um
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
# export so that we can use it in subscripts.
|
||||
export UMBASEPATH=`realpath $0 | xargs dirname`
|
||||
# TODO: load a config file?
|
||||
export UMDEFAULTINIT='000.md'
|
||||
|
||||
# TODO: decide if getopts would be better. positional args supposed to be bad.
|
||||
# https://stackoverflow.com/a/28466267
|
||||
|
||||
# catch first arguments with $1
|
||||
case "$1" in
|
||||
|
|
@ -22,6 +27,6 @@ case "$1" in
|
|||
$UMBASEPATH/tag.sh $2
|
||||
;;
|
||||
*)
|
||||
echo "usage: um (next|last|cat|rename|tag)"
|
||||
echo "usage: um (next|last|cat|rename|tag)"; exit 1
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Reference in a new issue