From a697fd2c5321069c66496ca4c3204971dddd7e5d Mon Sep 17 00:00:00 2001 From: Noah Gorny Date: Mon, 22 Jun 2020 14:48:49 +0300 Subject: [PATCH] plugins: Tidy gitstatus plugin comments and code --- plugins/available/gitstatus.plugin.bash | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/available/gitstatus.plugin.bash b/plugins/available/gitstatus.plugin.bash index 8e6558cd..98df693e 100644 --- a/plugins/available/gitstatus.plugin.bash +++ b/plugins/available/gitstatus.plugin.bash @@ -1,7 +1,6 @@ cite about-plugin about-plugin 'speeds up your life by using gitstatus for git status calculations. install from https://github.com/romkatv/gitstatus' - function gitstatus_on_disable() { about 'Destructor of gitstatus plugin' group 'gitstatus' @@ -10,12 +9,14 @@ function gitstatus_on_disable() { _command_exists gitstatus_stop && gitstatus_stop } -[[ "$SCM_CHECK" == "true" ]] || return # No scm-check +# No scm-check +[[ $SCM_CHECK == "true" ]] || return -[[ $- == *i* ]] || return # non-interactive shell +# non-interactive shell +[[ $- == *i* ]] || return -: ${SCM_GIT_GITSTATUS_DIR:="$HOME/gitstatus"} -if [[ -d "${SCM_GIT_GITSTATUS_DIR}" ]]; then +: "${SCM_GIT_GITSTATUS_DIR:="$HOME/gitstatus"}" +if [[ -d ${SCM_GIT_GITSTATUS_DIR} ]]; then source "${SCM_GIT_GITSTATUS_DIR}/gitstatus.plugin.sh" # Start the actual gitstatus binary gitstatus_stop && gitstatus_start -s -1 -u -1 -c -1 -d -1