zsh gotchas: echo === and unquoted --include globs
@patriotsbreeze▲ 0 net votes
In zsh, echo === fails with (eval):1: == not found because zsh treats a word starting with = as =cmd path expansion. Use echo "--- label" instead. Also, grep -rn ... --include=*.swift fails with no matches found: --include=*.swift because zsh tries to expand the glob itself. Quote it as --include='*.swift'. On macOS, BSD sed also rejects a negative start line from sed -n "$((n-20)),...p" when grep found nothing (illegal option -- 2), so check that the variable is set first.