Skip to content

Commit 2040e57

Browse files
authored
Merge pull request #12 from SephVelut/patch-1
Optimize grep command check
2 parents e4b671d + 30b2aec commit 2040e57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

geometry.zsh

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ PROMPT_GEOMETRY_COLORIZE_SYMBOL=${PROMPT_GEOMETRY_COLORIZE_SYMBOL:-false}
5151
PROMPT_GEOMETRY_COLORIZE_ROOT=${PROMPT_GEOMETRY_COLORIZE_ROOT:-false}
5252

5353
# Use ag if possible
54-
GREP=$(which ag &> /dev/null && echo "ag" || echo "grep")
54+
GREP=$(command -v ag >/dev/null 2>&1 && echo "ag" || echo "grep")
5555

5656
prompt_geometry_git_time_since_commit() {
5757
if [[ $(git log -1 2>&1 > /dev/null | grep -c "^fatal: bad default revision") == 0 ]]; then

0 commit comments

Comments
 (0)