diff --git a/.gitignore b/.gitignore index b83b5032..3b742273 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ **/.idea/ **/*.iml .DS_Store +query_string.y.go.tmp /analysis/token_filters/cld2/cld2-read-only /analysis/token_filters/cld2/libcld2_full.a /utils/bleve_create/bleve_create diff --git a/query_string_parser.go b/query_string_parser.go index f486e550..f9875df0 100644 --- a/query_string_parser.go +++ b/query_string_parser.go @@ -8,7 +8,12 @@ // and limitations under the License. //go:generate go tool yacc -o query_string.y.go query_string.y -//go:generate sed -i "" -e 1d query_string.y.go +//go:generate sed -i.tmp -e 1d query_string.y.go +//go:generate rm query_string.y.go.tmp + +// note: OSX sed and gnu sed handle the -i (in-place) option differently. +// using -i.tmp works on both, at the expense of having to remove +// the unsightly .tmp files package bleve