summaryrefslogtreecommitdiffstats
path: root/local/.bin/hornet/p
diff options
context:
space:
mode:
Diffstat (limited to 'local/.bin/hornet/p')
-rwxr-xr-xlocal/.bin/hornet/p5
1 files changed, 5 insertions, 0 deletions
diff --git a/local/.bin/hornet/p b/local/.bin/hornet/p
new file mode 100755
index 0000000..cbf15c4
--- /dev/null
+++ b/local/.bin/hornet/p
@@ -0,0 +1,5 @@
+#!/bin/bash
+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