aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-11-01 00:31:20 -0400
committerGitHub <noreply@github.com>2021-11-01 00:31:20 -0400
commitcc20037ff21a259419c7c00f6fce82ded3888d1e (patch)
treedc4c21a555b3808364ca957847638788cf8c179e
parentdc75e54109a037fa3de1eec52dfe7129913a627d (diff)
parent9958e9ab02b1db5308f4bb131d2c8687d13cf4fd (diff)
downloadrbw-master.tar.gz
rbw-master.zip
Merge pull request #73 from ivankovnatsky/masterHEADmaster
Break long line in rbw-fzf script
-rwxr-xr-xbin/rbw-fzf7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/rbw-fzf b/bin/rbw-fzf
index cbf15c4..308dd89 100755
--- a/bin/rbw-fzf
+++ b/bin/rbw-fzf
@@ -2,4 +2,9 @@
set -eu
set -o pipefail
-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
+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