I typed
apt search /packagekit
and got an error sed: -e Ausdruck #1, Zeichen 12: Unbekannte Option für »s« (German locale).
I should have got nothing, simply because it didn't match anything.
The culprit is
/usr/local/bin/highlight-mint
that uses sed with / delimiters. So the / in my search string caused the error.
I think that grep does the job better. Uses BRE as well, but no delimiter. And can even handle the highlighting: the customizable grep colors apply.
My proposal is
#!/bin/sh
unset GREP_OPTIONS
grep --color=auto -- "$1"
I typed
apt search /packagekitand got an error
sed: -e Ausdruck #1, Zeichen 12: Unbekannte Option für »s«(German locale).I should have got nothing, simply because it didn't match anything.
The culprit is
/usr/local/bin/highlight-mintthat uses
sedwith/delimiters. So the/in my search string caused the error.I think that
grepdoes the job better. Uses BRE as well, but no delimiter. And can even handle the highlighting: the customizablegrepcolors apply.My proposal is