UMBASEPATH
This commit is contained in:
parent
611e433ca4
commit
67c6d20181
2 changed files with 12 additions and 6 deletions
|
|
@ -64,7 +64,8 @@
|
||||||
# may in certain situations conflict with the alias. The link should be "next.sh" -> ~/config/..
|
# 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.
|
# 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 {
|
BEGIN {
|
||||||
# set field separator, blank by default
|
# set field separator, blank by default
|
||||||
|
|
@ -108,3 +109,6 @@ finalstr = sprintf("%s.%s", finalstr, $NF)
|
||||||
END {
|
END {
|
||||||
print finalstr
|
print finalstr
|
||||||
}'
|
}'
|
||||||
|
`
|
||||||
|
|
||||||
|
emacsclient --eval "(progn (find-file \"$NEXTFILE\") (journal) (message \"creating $NEXTFILE\"))"
|
||||||
|
|
|
||||||
12
um
12
um
|
|
@ -1,20 +1,22 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# export so that we can use it in subscripts.
|
||||||
|
export UMBASEPATH=`realpath $0 | xargs dirname`
|
||||||
|
|
||||||
# catch first arguments with $1
|
# catch first arguments with $1
|
||||||
case "$1" in
|
case "$1" in
|
||||||
next)
|
next)
|
||||||
NEXTFILE=`./bash/next/next.sh $2`
|
$UMBASEPATH/bash/next/next.sh $2
|
||||||
emacsclient --eval "(progn (find-file \"$NEXTFILE\") (journal))"
|
|
||||||
;;
|
;;
|
||||||
last)
|
last)
|
||||||
./bash/last/last.sh
|
$UMBASEPATH/bash/last/last.sh
|
||||||
;;
|
;;
|
||||||
cat)
|
cat)
|
||||||
# all args but first
|
# all args but first
|
||||||
./bash/mdcat/mdcat.sh "${@:2}"
|
$UMBASEPATH/bash/mdcat/mdcat.sh "${@:2}"
|
||||||
;;
|
;;
|
||||||
rename)
|
rename)
|
||||||
./bash/rename/rename.sh "${@:2}"
|
$UMBASEPATH/bash/rename/rename.sh "${@:2}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# else
|
# else
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue