(colima status 2>&1 | grep -Fqe 'colima is running') runs in a subshell because it is in parentheses. I am not sure for your system, but this could be causing the problem because it might return an extra linefeed or some other thing. Try your "if" block with the parentheses removed and go from there?