tfix to tomb search - tomb - the crypto undertaker
 (HTM) git clone git://parazyd.org/tomb.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit d769a09d258ad9ab96d64ba0a5eac37280655445
 (DIR) parent fc84c27a49b0b294eda66eae495ef6b790dc6202
 (HTM) Author: Jaromil <jaromil@dyne.org>
       Date:   Tue, 16 Apr 2013 13:40:25 +0200
       
       fix to tomb search
       
       correctly searches across multiple mounted tombs
       
       Diffstat:
         M src/tomb                            |      14 ++++++++------
       
       1 file changed, 8 insertions(+), 6 deletions(-)
       ---
 (DIR) diff --git a/src/tomb b/src/tomb
       t@@ -1743,17 +1743,19 @@ search_tombs() {
            { test ${#mounted_tombs} = 0 } && {
                    die "I can't see any open tomb, may they all rest in peace." }
            yes "Searching for: $fg_bold[white]${=PARAM}$fg_no_bold[white]"
       -    for t in ${(f)mounted_tombs}; do
       +    for t in ${mounted_tombs}; do
       +        xxx "checking for index: ${t}"
                mapper=`basename ${t[(ws:;:)1]}`
                tombname=${t[(ws:;:)5]}
                tombmount=${t[(ws:;:)2]}
       -        { test -r ${tombmount}/.updatedb } || {
       +        if [ -r ${tombmount}/.updatedb ]; then
       +            say "Searching in tomb $tombname"
       +            locate -d ${tombmount}/.updatedb -e -i ${=PARAM}
       +            say "Matches found: `locate -d ${tombmount}/.updatedb -e -i -c ${=PARAM}`"
       +        else
                    no "skipping tomb $tombname: not indexed"
                    no "run 'tomb index' to create indexes"
       -            continue }
       -        say "Searching in tomb $tombname"
       -        locate -d ${tombmount}/.updatedb -e -i ${=PARAM}
       -        say "Matches found: `locate -d ${tombmount}/.updatedb -e -i -c ${=PARAM}`"
       +        fi
            done
                
        }