brew install gnu-sed --with-default-names
--with-default-names install it as "sed" and not "gnu-sed".
Note that mac-setup installs GNU sed as part of a new Mac configuration procedure.