zsh-goto/_zsh_goto_sed

13 lines
239 B
Text
Raw Permalink Normal View History

2022-08-17 22:46:24 +00:00
#!/usr/bin/env zsh
2022-11-26 19:08:40 +00:00
set -e
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