summaryrefslogtreecommitdiffstats
path: root/bin/hush/p
diff options
context:
space:
mode:
Diffstat (limited to 'bin/hush/p')
-rwxr-xr-xbin/hush/p4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/hush/p b/bin/hush/p
index 79c57c3..dc0ba9c 100755
--- a/bin/hush/p
+++ b/bin/hush/p
@@ -1,5 +1,5 @@
-#!/bin/sh
+#!/bin/bash
set -eu
set -o pipefail
-rbw ls --fields name,user | perl -pale'$_ = "$F[0]/$F[1]\t$_"' | fzf --with-nth=1 | perl -pale's/^[^\t]*\t//' | xargs -r rbw get
+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