aboutsummaryrefslogtreecommitdiff
path: root/bindings.bb
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2020-02-22 16:05:05 -0800
committerBruce Hill <bruce@bruce-hill.com>2020-02-22 16:05:05 -0800
commit96360428586f3d5722bb9fdc9baf1b1cc0b5dbc6 (patch)
treec2df717d1dfdf75ec649e673f9f80ad6533df66e /bindings.bb
parentd7e6159eb855578142b19d4becadadc5c55e32ca (diff)
Initial working version using globbing.
Diffstat (limited to 'bindings.bb')
-rw-r--r--bindings.bb10
1 files changed, 5 insertions, 5 deletions
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