diff options
author | Malf Furious <m@lfurio.us> | 2018-10-09 22:24:55 -0400 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2018-10-09 22:24:55 -0400 |
commit | b61e56981dd705b56496090972d085a8b77d5366 (patch) | |
tree | ed288c392509ad87e1e112faf695c09b0c73f555 /repo-access.sh | |
parent | 53b619e1c927c518c27150c8ac0a4c99791c61cd (diff) | |
download | systrunk-b61e56981dd705b56496090972d085a8b77d5366.tar.gz systrunk-b61e56981dd705b56496090972d085a8b77d5366.zip |
Add -d option to status op
`systrunk status -d` will now display a shortdiff in the status output.
This is off by default since worktrees for system drives probabally
won't want it all the time.
Diffstat (limited to 'repo-access.sh')
-rw-r--r-- | repo-access.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/repo-access.sh b/repo-access.sh index 3e9fa8d..3685318 100644 --- a/repo-access.sh +++ b/repo-access.sh @@ -193,12 +193,13 @@ function systr_init } ## -# systrunk status +# systrunk status [-d] # # View current information such as which branch your worktree is # TRACking, which commit it is BASEd on, and how far out-of-date # it is. Additionally, report whether a merge or update operation -# is currently in-progress. +# is currently in-progress. If '-d' is given, status will be +# accompanied by a shortdiff of pending, uncommitted changes. ## function systr_status { @@ -237,4 +238,9 @@ function systr_status echo "Behind $dist commits" fi fi + + if [[ "$1" == "-d" ]]; then + echo "" + systrunk shortdiff && echo "No pending changes" + fi } |