diff options
author | Dylan Araps <dylan.araps@gmail.com> | 2019-01-14 16:41:36 +0200 |
---|---|---|
committer | Dylan Araps <dylan.araps@gmail.com> | 2019-01-14 16:41:36 +0200 |
commit | bcfc72a0a62166db3b9ee38dcdbf4e23c3b8e82d (patch) | |
tree | 5e986bee5240b88a00d42639b98dbbf3646ac960 | |
parent | 58e6262be707868f77a01cf0d22bcef1e3b21606 (diff) |
general: Added 2 level searchmulti_search
-rwxr-xr-x | fff | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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 |