zsh-goto/_sed

10 lines
226 B
Text
Raw Normal View History

2022-08-11 06:11:04 +00:00
#!/usr/bin/zsh
# MacOS support - prefer GNU sed eg. from Homebrew to 'sed'
if command -v gsed &>/dev/null; then
gsed "$@"
elif command -v sed &>/dev/null; then
sed "$@"
else
echo "Unable to find a sed!" >&2; return 1
fi