zsh-goto/_zsh_goto_sed

10 lines
230 B
Text
Raw Normal View History

2022-08-17 22:46:24 +00:00
#!/usr/bin/env zsh
2022-08-11 06:11:04 +00:00
# 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