plugins: Tidy gitstatus plugin comments and code
parent
d7aebe17a3
commit
a697fd2c53
|
|
@ -1,7 +1,6 @@
|
||||||
cite about-plugin
|
cite about-plugin
|
||||||
about-plugin 'speeds up your life by using gitstatus for git status calculations. install from https://github.com/romkatv/gitstatus'
|
about-plugin 'speeds up your life by using gitstatus for git status calculations. install from https://github.com/romkatv/gitstatus'
|
||||||
|
|
||||||
|
|
||||||
function gitstatus_on_disable() {
|
function gitstatus_on_disable() {
|
||||||
about 'Destructor of gitstatus plugin'
|
about 'Destructor of gitstatus plugin'
|
||||||
group 'gitstatus'
|
group 'gitstatus'
|
||||||
|
|
@ -10,12 +9,14 @@ function gitstatus_on_disable() {
|
||||||
_command_exists gitstatus_stop && gitstatus_stop
|
_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"}
|
: "${SCM_GIT_GITSTATUS_DIR:="$HOME/gitstatus"}"
|
||||||
if [[ -d "${SCM_GIT_GITSTATUS_DIR}" ]]; then
|
if [[ -d ${SCM_GIT_GITSTATUS_DIR} ]]; then
|
||||||
source "${SCM_GIT_GITSTATUS_DIR}/gitstatus.plugin.sh"
|
source "${SCM_GIT_GITSTATUS_DIR}/gitstatus.plugin.sh"
|
||||||
# Start the actual gitstatus binary
|
# Start the actual gitstatus binary
|
||||||
gitstatus_stop && gitstatus_start -s -1 -u -1 -c -1 -d -1
|
gitstatus_stop && gitstatus_start -s -1 -u -1 -c -1 -d -1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue