diff --git a/functions/__sf_section_git_status.fish b/functions/__sf_section_git_status.fish index 85b6715..eb6be84 100644 --- a/functions/__sf_section_git_status.fish +++ b/functions/__sf_section_git_status.fish @@ -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 diff --git a/tests/__sf_section_git_status.test.fish b/tests/__sf_section_git_status.test.fish index 0d1f482..91c6fd5 100644 --- a/tests/__sf_section_git_status.test.fish +++ b/tests/__sf_section_git_status.test.fish @@ -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