tindex.dcgi: fix multi-keyword search - recipes - various cooking recipes
(HTM) git clone git://src.adamsgaard.dk/recipes
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
---
(DIR) commit 20a8c506790c594479326b641a571b03084e5658
(DIR) parent 9dcf4752fd59397388818ae07e5e8dc375b27910
(HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Fri, 27 Aug 2021 12:18:30 +0200
index.dcgi: fix multi-keyword search
tthanks parazyd
Diffstat:
M index.dcgi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
(DIR) diff --git a/index.dcgi b/index.dcgi
t@@ -25,17 +25,17 @@ gphfmt() {
if test -n "${search}"; then
if test "${arguments}" = "vegetarian"; then
- results="$(./cookwhatveg "$search" | gphfmt)"
+ results="$(./cookwhatveg $search | gphfmt)"
else
- results="$(./cookwhat "$search" | gphfmt)"
+ results="$(./cookwhat $search | gphfmt)"
fi
n="$(printf '%s' "$results" | wc -l)"
if test "$n" -gt 0; then
if test "$n" -gt 1; then
- printf '\n## Results (%d recipes)\n' "$n"
+ printf '\n## Results (%d recipes): "%s" \n' "$n" "$search"
else
- printf '\n## Just one result\n'
+ printf '\n## Just one result: "%s" \n' "$search"
fi
printf '\n%s\n' "$results"
else