summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2019-01-14 16:41:36 +0200
committerDylan Araps <dylan.araps@gmail.com>2019-01-14 16:41:36 +0200
commitbcfc72a0a62166db3b9ee38dcdbf4e23c3b8e82d (patch)
tree5e986bee5240b88a00d42639b98dbbf3646ac960
parent58e6262be707868f77a01cf0d22bcef1e3b21606 (diff)
general: Added 2 level searchmulti_search
-rwxr-xr-xfff9
1 files changed, 7 insertions, 2 deletions
diff --git a/fff b/fff
index 47cf997..95d356b 100755
--- a/fff
+++ b/fff
@@ -423,6 +423,11 @@ cmd_line() {
# Use a greedy glob to search.
list=("$PWD"/*"$cmd_reply"*)
+
+ # Use an even greedier glob in 2 level search.
+ [[ $1 == "?" ]] &&
+ list+=("$PWD"/*/*"$cmd_reply"*)
+
((list_total=${#list[@]}-1))
# Draw the search results on screen.
@@ -532,8 +537,8 @@ key() {
;;
# Search.
- /)
- cmd_line "/" "search"
+ /|'?')
+ cmd_line "$1" "search"
# If the search came up empty, redraw the current dir.
if [[ -z ${list[*]} || -z $cmd_reply ]]; then