update
This commit is contained in:
parent
7a97c460d8
commit
c3c680ecca
11 changed files with 364 additions and 356 deletions
28
bashrc.d/60-directory-notes.bash
Normal file
28
bashrc.d/60-directory-notes.bash
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# shellcheck shell=bash
|
||||
|
||||
check_todo() {
|
||||
if [[ -f TODO.md ]]; then
|
||||
echo
|
||||
printf '%bTODO.md%b\n' "$_DIM_RED" "$_NC"
|
||||
printf '%s\n' '---------------------------'
|
||||
if command -v mdcat >/dev/null 2>&1; then mdcat TODO.md; else cat TODO.md; fi
|
||||
printf '%s\n\n' '---------------------------'
|
||||
fi
|
||||
}
|
||||
|
||||
check_autonote() {
|
||||
if [[ -f .autonote.md ]]; then
|
||||
echo
|
||||
printf '%bautonote.md%b\n' "$_DIM_RED" "$_NC"
|
||||
printf '%s\n' '---------------------------'
|
||||
if command -v mdcat >/dev/null 2>&1; then mdcat .autonote.md; else cat .autonote.md; fi
|
||||
printf '%s\n\n' '---------------------------'
|
||||
fi
|
||||
}
|
||||
|
||||
cd() {
|
||||
builtin cd "$@" || return
|
||||
check_todo
|
||||
check_autonote
|
||||
return 0
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue