diff options
Diffstat (limited to 'radar-base.sh')
-rwxr-xr-x | radar-base.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/radar-base.sh b/radar-base.sh index 9d52012..649978f 100755 --- a/radar-base.sh +++ b/radar-base.sh @@ -555,11 +555,17 @@ stashed_status() { } is_cwd_a_dot_git_directory() { - [[ "$(basename "$PWD")" == ".git" ]]; return $? + if [[ "${1##*/}" == ".git" ]]; then + return 0 + elif [[ -z $1 ]]; then + return 1 + else + is_cwd_a_dot_git_directory "${1%/*}" + fi } stash_status() { - if ! is_cwd_a_dot_git_directory; then + if ! is_cwd_a_dot_git_directory "$PWD"; then local number_stashes="$(stashed_status)" if [ $number_stashes -gt 0 ]; then printf $PRINT_F_OPTION "${number_stashes}${COLOR_STASH}≡${RESET_COLOR_STASH}" |