commit dff0b94ac7f02c49c8f5f9118b03451bfd180d98
parent 3e3c942e3256876054c47c0eef7dbb20c493ad58
Author: William Casarin <jb55@jb55.com>
Date: Fri, 13 Nov 2020 06:07:28 -0800
fuzz-run-command: pass arguments
Diffstat:
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/bin/fuzz-edit-file b/bin/fuzz-edit-file
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
set -e
-file=$(rg --files | $FUZZER)
+file=$(rg --files "$1" | $FUZZER)
echo $EDITOR \"$(readlink -f $file)\"
diff --git a/bin/fuzz-run-command b/bin/fuzz-run-command
@@ -12,6 +12,7 @@ function runner() {
fi
res=$($FUZZER +i --select-1 --exit-0 -q ^$prefix < $HOME/dotfiles/commands) &&
get_cmd=$(cutt -f3 <<<"$res") || return
+ get_cmd="$get_cmd $@"
fhist="$HOME/.fuzzhist"
touch "$fhist"
export ORIG_OPTS="$FZF_DEFAULT_OPTS"