commit a7b83dff9f0e6e51dee13710d35936ee26cc1fb9 parent 35184479140e0fc970fd92ad36af31f5a92a855b Author: parazyd <parazyd@dyne.org> Date: Tue, 29 Dec 2015 16:45:11 +0100 search function Diffstat:
M | gtomb | | | 24 | ++++++++++++++++++++++-- |
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/gtomb b/gtomb @@ -926,8 +926,28 @@ function _index { # }}} # {{{ search - searches the contents of indexed tombs - _zeninfo "Sorry" "Not implemented yet." - exec _main +function _search { + strings="" + + function _searchstring { + srchstring=`_zenentry "Search" "Enter an argument to search. Cancel to finish."` + res=$? + strings="$strings $srchstring" + + if [[ $res == "1" ]]; then + tombtmp="/tmp/tombtmp" + $TOMBPATH search $strings > $tombtmp + #cat $tombtmp | \ + zenity \ + --text-info \ + --title="Search results" \ + --filename=$tombtmp + else + _searchstring + fi + } + _searchstring +} # }}} if [ ! -f $TOMBPATH ]; then