[pass] [PATCH] Add support for 'show -t/--tail' to print 2nd and subsequent lines

guns self at sungpae.com
Fri Jul 4 22:41:14 CEST 2014


On Fri  4 Jul 2014 at 07:16:36AM -0400, Von Welch wrote:

> Thanks for chiming in. Yes, 'pass -c -t <store>' is basically my
> default now, putting the password into the clipboard and all the
> metadata to stdout. Once I had this ability, I find it's what I want
> most of the time and it's benign the rest.

This should be a one liner in your favorite scripting language:

# GNU sed¹
passc() {
    pass "$@" | sed -ne '1p; 2,$w /dev/stderr' | clip-cmd
}

# Ruby
passc() {
    pass "$@" | ruby -e 'puts $stdin.gets; warn $stdin.read' | clip-cmd
}

The metadata is written to stderr instead of stdout, but the same effect
is achieved.

    guns

¹ Not implying sed is anyone's favorite scripting language
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20140704/cd8c5195/attachment.asc>


More information about the Password-Store mailing list