aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-10-28 23:30:38 -0400
committerJesse Luehrs <doy@tozt.net>2021-10-28 23:30:38 -0400
commit7e5b1b1452c17ba5c5c253a6eec3ad5d076b5fa6 (patch)
tree0d61c9c7b372454d436f3735e6d8d4babea5325c
parenta7e7961f56cc0c75c56db83ecdff5de28ab05101 (diff)
downloadrbw-7e5b1b1452c17ba5c5c253a6eec3ad5d076b5fa6.tar.gz
rbw-7e5b1b1452c17ba5c5c253a6eec3ad5d076b5fa6.zip
fix some edge cases in the fzf script
-rwxr-xr-xbin/rbw-fzf2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/rbw-fzf b/bin/rbw-fzf
index dc0ba9c..cbf15c4 100755
--- a/bin/rbw-fzf
+++ b/bin/rbw-fzf
@@ -2,4 +2,4 @@
set -eu
set -o pipefail
-rbw ls --fields name,user,folder | perl -plE'/^([^\t]*)\t([^\t]*)\t([^\t]*)$/; $_ = join("/", grep { length } ($3, $1, $2)) . "\t$_"' | sort | fzf --with-nth=1 | perl -ple'/^([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)$/; $_ = "$2 $3"' | xargs -r rbw get
+rbw ls --fields name,user,folder | perl -plE'/^([^\t]*)\t([^\t]*)\t([^\t]*)$/; $_ = join("/", grep { length } ($3, $1, $2)) . "\0$_"' | sort | fzf --with-nth=1 -d '\x00' | perl -ple'/^([^\0]*)\0([^\t]*)\t([^\t]*)\t([^\t]*)$/; $_ = "$2 $3"; $_ .= " --folder=\"$4\"" if length $4' | xargs -r rbw get