plugins: Rename SCM_GIT_GITSTATUS_PLUGIN_SH_LOC to SCM_GIT_GITSTATUS_DIR
Also fix the destructor in case plugin did not load as expected
This commit is contained in:
@@ -7,16 +7,16 @@ function gitstatus_on_disable() {
|
||||
group 'gitstatus'
|
||||
|
||||
unset SCM_GIT_USE_GITSTATUS
|
||||
gitstatus_stop
|
||||
_command_exists gitstatus_stop && gitstatus_stop
|
||||
}
|
||||
|
||||
[[ "$SCM_CHECK" == "true" ]] || return # No scm-check
|
||||
|
||||
[[ $- == *i* ]] || return # non-interactive shell
|
||||
|
||||
SCM_GIT_GITSTATUS_PLUGIN_SH_LOC=${SCM_GIT_GITSTATUS_PLUGIN_SH_LOC:="$HOME/gitstatus/gitstatus.plugin.sh"}
|
||||
if [[ -f "${SCM_GIT_GITSTATUS_PLUGIN_SH_LOC}" ]]; then
|
||||
source "${SCM_GIT_GITSTATUS_PLUGIN_SH_LOC}"
|
||||
: ${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
|
||||
export SCM_GIT_USE_GITSTATUS=true
|
||||
|
||||
Reference in New Issue
Block a user