Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
fix: show git status based on SPACEFISH_GIT_STATUS_SHOW (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
hrvoj3e authored and matchai committed Feb 14, 2019
1 parent b1c7454 commit 1d34eb9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions functions/__sf_section_git_status.fish
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ function __sf_section_git_status -d "Display the current git status"
# Section
# ------------------------------------------------------------------------------

[ $SPACEFISH_GIT_STATUS_SHOW = false ]; and return

set -l git_status
set -l is_ahead
set -l is_behind
Expand Down
6 changes: 6 additions & 0 deletions tests/__sf_section_git_status.test.fish
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ test "Displays the correct symbol for stashed file"
) = (__sf_section_git_status)
end

test "Test config option SPACEFISH_GIT_STATUS_SHOW"
(
set -g SPACEFISH_GIT_STATUS_SHOW false
) = (__sf_section_git_status)
end

# TODO: Get test dir into status *U*
# TODO: Add test for ahead
# TODO: Add test for behind
Expand Down

0 comments on commit 1d34eb9

Please sign in to comment.