scwrypts/zsh/memo/common.zsh
yage a740a66870 v2.4.0
=====================================================================

--- New Scripts --------------------------

zsh )
  memo program; quickly take notes!
   - memo/open
   - memo/remove
2022-08-10 00:46:07 -06:00

20 lines
498 B
Bash

_DEPENDENCIES+=()
_REQUIRED_ENV+=()
source ${0:a:h}/../common.zsh
#####################################################################
set +o noglob
MEMO__FILETYPE=md
MEMO__DIR="$SCWRYPTS_DATA_PATH/memo"
[ ! -d $MEMO__DIR ] && mkdir -p $MEMO__DIR
LIST_MEMOS() { ls $MEMO__DIR | sed "s/\.$MEMO__FILETYPE$//" | sort; }
# TODO : remove deprecated migration
[ -d $HOME/.memos ] && {
__Yn 'detected legacy memos folder; upgrade now?' && {
mv $HOME/.memos/* $MEMO__DIR
rmdir "$HOME/.memos"
}
}