|
|
tindex.dcgi: fix multi-keyword search - recipes - various cooking recipes |
|
|
 |
git clone git://src.adamsgaard.dk/recipes (git://src.adamsgaard.dk) |
|
|
 |
Log |
|
|
 |
Files |
|
|
 |
Refs |
|
|
 |
Submodules |
|
|
|
--- |
|
|
 |
commit 20a8c506790c594479326b641a571b03084e5658 |
|
|
 |
parent 9dcf4752fd59397388818ae07e5e8dc375b27910 |
|
|
 |
Author: Anders Damsgaard <anders@adamsgaard.dk> (mailto://) |
|
|
|
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(-) |
|
|
|
--- |
|
|
 |
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 |
|