nb: add cd subcommand
This commit is contained in:
parent
f38cccf8f2
commit
2dc699c79d
1 changed files with 4 additions and 0 deletions
|
|
@ -16,6 +16,7 @@ nb - Notebook management tool
|
||||||
Usage: nb <command>
|
Usage: nb <command>
|
||||||
|
|
||||||
Commands:
|
Commands:
|
||||||
|
cd Change directories
|
||||||
save Commit changes with timestamp
|
save Commit changes with timestamp
|
||||||
sync Save, fetch, and push changes
|
sync Save, fetch, and push changes
|
||||||
log Show commit log
|
log Show commit log
|
||||||
|
|
@ -26,6 +27,9 @@ EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
cd)
|
||||||
|
exec "$SHELL"
|
||||||
|
;;
|
||||||
save)
|
save)
|
||||||
jj diff -r @ --summary | grep -q . && jj commit -m "$(date +"%Y-%m-%dT%H:%M:%S%z")" && jj tug || true
|
jj diff -r @ --summary | grep -q . && jj commit -m "$(date +"%Y-%m-%dT%H:%M:%S%z")" && jj tug || true
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue