From b61e56981dd705b56496090972d085a8b77d5366 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Tue, 9 Oct 2018 22:24:55 -0400 Subject: 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. --- repo-access.sh | 10 ++++++++-- 1 file 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 } -- cgit v1.2.3