citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

commit e98a671366ee40920223165e73f15fb7ccc40935
parent 8c7015d0819c3a4ac292692af93be043ffb4fb70
Author: William Casarin <jb55@jb55.com>
Date:   Thu, 12 Nov 2020 18:51:08 -0800

fuzz: misc changes

Diffstat:
Mbin/fuzz-edit-command | 2+-
Mbin/fuzz-run-command | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/fuzz-edit-command b/bin/fuzz-edit-command @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -e res=$(<$HOME/dotfiles/commands $FUZZER) -echo "sedit $(cutt -f3 <<<$res)" +echo sedit "$(cutt -f3 <<<$res)" diff --git a/bin/fuzz-run-command b/bin/fuzz-run-command @@ -10,13 +10,13 @@ function runner() { prefix="$1" shift fi - res=$($FUZZER +i --select-1 --exit-0 -q ^"$prefix" < $HOME/dotfiles/commands) && + res=$($FUZZER +i --select-1 --exit-0 -q ^$prefix < $HOME/dotfiles/commands) && get_cmd=$(cutt -f3 <<<"$res") || return fhist="$HOME/.fuzzhist" touch "$fhist" export ORIG_OPTS="$FZF_DEFAULT_OPTS" export INITIAL_QUERY="$@" - if [ "$@" ]; then + if [ -n "$@" ]; then export FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS -q '$@'" fi cmd="$(eval $get_cmd)"