From eb82836e5f2972c7a9bf8982af987b645140fc40 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 4 May 2020 00:06:41 -0400 Subject: include folders when picking passwords --- bin/hush/p | 4 ++-- 1 file 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 -- cgit v1.2.3