Skip to content

Commit

Permalink
fix bash bindings when sourced via relative path
Browse files Browse the repository at this point in the history
  • Loading branch information
romkatv committed May 10, 2020
1 parent 5b482d1 commit 30653f6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gitstatus.plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,11 @@ function gitstatus_start() {

if [[ "${BASH_SOURCE[0]}" == */* ]]; then
local gitstatus_plugin_dir="${BASH_SOURCE[0]%/*}"
if [[ "$gitstatus_plugin_dir" != /* ]]; then
gitstatus_plugin_dir="$PWD"/"$gitstatus_plugin_dir"
fi
else
local gitstatus_plugin_dir=.
local gitstatus_plugin_dir="$PWD"
fi

local req_fifo resp_fifo
Expand Down

0 comments on commit 30653f6

Please sign in to comment.