UMBASEPATH

This commit is contained in:
bth 2024-01-13 11:50:33 -08:00
commit 67c6d20181
2 changed files with 12 additions and 6 deletions

View file

@ -64,7 +64,8 @@
# may in certain situations conflict with the alias. The link should be "next.sh" -> ~/config/..
# 4. NOTE: I use 'e' rather than 'emacs', to use my clever emacs/emacsclient function.
ls | egrep '^[[:digit:]].*\.md|txt' | tail -n 1 | awk '
NEXTFILE=`$UMBASEPATH/bash/last/last.sh | awk '
BEGIN {
# set field separator, blank by default
@ -108,3 +109,6 @@ finalstr = sprintf("%s.%s", finalstr, $NF)
END {
print finalstr
}'
`
emacsclient --eval "(progn (find-file \"$NEXTFILE\") (journal) (message \"creating $NEXTFILE\"))"

12
um
View file

@ -1,20 +1,22 @@
#!/bin/bash
# export so that we can use it in subscripts.
export UMBASEPATH=`realpath $0 | xargs dirname`
# catch first arguments with $1
case "$1" in
next)
NEXTFILE=`./bash/next/next.sh $2`
emacsclient --eval "(progn (find-file \"$NEXTFILE\") (journal))"
$UMBASEPATH/bash/next/next.sh $2
;;
last)
./bash/last/last.sh
$UMBASEPATH/bash/last/last.sh
;;
cat)
# all args but first
./bash/mdcat/mdcat.sh "${@:2}"
$UMBASEPATH/bash/mdcat/mdcat.sh "${@:2}"
;;
rename)
./bash/rename/rename.sh "${@:2}"
$UMBASEPATH/bash/rename/rename.sh "${@:2}"
;;
*)
# else