~srivathsan/note

36e16e4dcbf22f7e95e8b42c2b6dd3082673c037 — Srivathsan Murali 1 year, 9 months ago 93cc638 0.1.1
fix: note ls [subdir] not working
1 files changed, 8 insertions(+), 3 deletions(-)

M note
M note => note +8 -3
@@ 52,8 52,13 @@ cmd_remove() {
}

cmd_list() {
  path=${1:-""}
	tree -C -l --noreport "$NOTES_DIR/$path" | tail -n +2 | sed -E 's/\.md(\x1B\[[0-9]+m)?( ->|$)/\1\2/g' # remove .md at end of line, but keep colors
  path=${1:-"."}
  (
    cd "$NOTES_DIR"
	  tree -C -l --noreport "$path" \
    | tail -n +1 \
    | sed -E -e 's/\.md(\x1B\[[0-9]+m)?( ->|$)/\1\2/g' # remove .md at end of line, but keep colors
  )
}

PROGRAM="${0##*/}"


@@ 85,7 90,7 @@ cmd_usage() {
case "$1" in
  init) shift; cmd_init ;;
  open) shift; cmd_open $@;;
  ls|list) shift; cmd_list ;; 
  ls|list) shift; cmd_list $@;; 
  mv|move) shift; cmd_move $@ ;;
  rm|remove) shift; cmd_remove $@ ;;
  git) shift; git_cmd "$@" ;;