Skip to content

Commit

Permalink
Fix git prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
kip93 committed Aug 5, 2022
1 parent c26a8bb commit 71bbdae
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -249,16 +249,10 @@ pkgs.mkShell {
# Assign a colour to the "cleaniness" of the repo
local colour
colour="$(
if _is_git '${toString ./.}' ; then
if ! _is_git '${toString ./.}' ; then
# No repo -> red
${coreutils}/bin/printf 9 ;
elif [ \
"$(
${coreutils}/bin/printf '%s\n' "''${git_status}" |
${gnused}/bin/sed '/^\s*$/d' |
${coreutils}/bin/wc -l ;
)" -eq 0 \
] ; then
elif [ -z "''${git_status}" ] ; then
# Clean repo -> green
${coreutils}/bin/printf 10 ;
elif
Expand Down

0 comments on commit 71bbdae

Please sign in to comment.