Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Commit

Permalink
Test more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienPivard committed Jul 21, 2018
1 parent e39e024 commit 5ce384f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/colors.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function getColorCode() {
echo -n "$1"
fi
# Check if value is none with any case.
elif [[ $1 = [nN][oO][nN][eE] ]]
elif [[ "${(L)1}" == "none" ]]
then
echo -n 'none'

This comment has been minimized.

Copy link
@onaforeignshore

onaforeignshore Aug 9, 2018

Contributor

Since isSameColor() checks for NONE, shouldn't this be echo -n 'NONE'?

This comment has been minimized.

Copy link
@dritter

dritter Aug 9, 2018

Member

Well, if you pass lowercase none to isSameColor, the early exit does not match and an actual comparison is made. This seems more correct to me than the early exit itself. If you pass two uppercase NONE values, the function returns false, which seems not correct to me. What if you have two segments without a background color?
IMHO we should remove that check for uppercase NONE.. WDYT?

This comment has been minimized.

Copy link
@JulienPivard

JulienPivard Aug 12, 2018

Author Contributor

After little test I don't see difference between echo -n 'NONE' and echo -n 'none' in result.
capture d ecran 2018-08-12 a 15 37 58

The segment separator is white but could we change the arrow segment separator by the arrow subsegment separator ? Or an other trick to improve the rendering ?

else
Expand Down

0 comments on commit 5ce384f

Please sign in to comment.