zsh-goto/_zsh_goto_sed
2022-11-26 12:08:40 -07:00

12 lines
239 B
Bash
Executable file

#!/usr/bin/env zsh
set -e
# 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