nb: add cd subcommand

This commit is contained in:
Matthew Ryan Dillon 2025-12-14 16:35:35 -05:00
parent f38cccf8f2
commit 2dc699c79d

View file

@ -16,6 +16,7 @@ nb - Notebook management tool
Usage: nb <command>
Commands:
cd Change directories
save Commit changes with timestamp
sync Save, fetch, and push changes
log Show commit log
@ -26,6 +27,9 @@ EOF
}
case "$1" in
cd)
exec "$SHELL"
;;
save)
jj diff -r @ --summary | grep -q . && jj commit -m "$(date +"%Y-%m-%dT%H:%M:%S%z")" && jj tug || true
;;