From 96360428586f3d5722bb9fdc9baf1b1cc0b5dbc6 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 22 Feb 2020 16:05:05 -0800 Subject: Initial working version using globbing. --- bindings.bb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bindings.bb') diff --git a/bindings.bb b/bindings.bb index 55b9ad4..fa38614 100644 --- a/bindings.bb +++ b/bindings.bb @@ -23,14 +23,14 @@ l,Right: # Enter directory if [ -d "$BBCURSOR" ]; then bbcmd cd:"$BBCURSOR"; fi Ctrl-f: # Search for file file="$( - if [ $BBDOTFILES ]; then find -mindepth 1 -printf '%P\0'; - else find -mindepth 1 ! -path '*/.*' -printf '%P\0'; - fi | pick "Find: " + find $BBGLOBS -mindepth 1 -printf '%P\0' | pick "Find: " )" && bbcmd goto:"$file" /: # Pick a file - file="$(find -mindepth 1 -maxdepth 1 -printf '%P\0' | pick "Pick: ")" || exit - expr "$file" : "\..*" >/dev/null && ! [ "$BBDOTFILES" ] && bbcmd dotfiles + file="$(printf "%s\0" $BBGLOBS | pick "Pick: ")" || exit bbcmd goto:"$file" +*: # Set the glob + ask BBGLOBS "Show files matching: " + bbcmd glob:"$BBGLOBS" Ctrl-g: # Go to directory ask goto "Go to directory: " && bbcmd cd:"$goto" m: # Mark this directory -- cgit v1.2.3