Commit 2e5d4057 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-search: output used grep command too

parent b1c331b3
...@@ -61,9 +61,8 @@ case $PMTYPE in ...@@ -61,9 +61,8 @@ case $PMTYPE in
;; ;;
slackpkg) slackpkg)
# FIXME # FIXME
echo "FIXME: need case insensitive search" echo "Note: case sensitive search"
docmd_foreach "/usr/sbin/slackpkg search" $string CMD="/usr/sbin/slackpkg search"
return
;; ;;
homebrew) homebrew)
CMD="brew search" CMD="brew search"
...@@ -80,9 +79,7 @@ docmd $CMD $string ...@@ -80,9 +79,7 @@ docmd $CMD $string
__epm_search_make_grep() __epm_search_make_grep()
{ {
local i local i
local string="$1"
shift shift
echo -n "\"$string\""
for i in $@ ; do for i in $@ ; do
local NOR=${i/^/} local NOR=${i/^/}
if [ "$NOR" = "$i" ] ; then if [ "$NOR" = "$i" ] ; then
...@@ -99,5 +96,7 @@ epm_search() ...@@ -99,5 +96,7 @@ epm_search()
{ {
[ -n "$pkg_filenames" ] || fatal "Run search without any string" [ -n "$pkg_filenames" ] || fatal "Run search without any string"
# FIXME: do it better # FIXME: do it better
eval "__epm_search_output $(eval __epm_search_make_grep $quoted_args)" local MGS=$(eval __epm_search_make_grep $quoted_args)
EXTRA_SHOWDOCMD=$MGS
eval "__epm_search_output \"$(eval get_firstarg $quoted_args)\" $MGS"
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment