<div dir="ltr">Hi guns,<div><br></div><div> I'm not sure of your logic to arrive at why it "should" be done the way you state, but I'll just point our you are re-implementing parts of the logic of pass in the script wrapper (namely splitting the password from the metadata, figuring out the right clipboard command). I like to avoid repeating logic (DRY so to speak).</div>

<div><br></div><div> To put it another way, I'll point out pass gives me a command to separate out the password (-c/--clip), a complementary command to pull out the metadata doesn't seem unreasonable.</div><div> </div>

<div>Von</div><div><br></div><div> </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 4, 2014 at 4:41 PM, guns <span dir="ltr"><<a href="mailto:self@sungpae.com" target="_blank">self@sungpae.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Fri  4 Jul 2014 at 07:16:36AM -0400, Von Welch wrote:<br>
<br>
> Thanks for chiming in. Yes, 'pass -c -t <store>' is basically my<br>
> default now, putting the password into the clipboard and all the<br>
> metadata to stdout. Once I had this ability, I find it's what I want<br>
> most of the time and it's benign the rest.<br>
<br>
</div>This should be a one liner in your favorite scripting language:<br>
<br>
# GNU sed¹<br>
passc() {<br>
    pass "$@" | sed -ne '1p; 2,$w /dev/stderr' | clip-cmd<br>
}<br>
<br>
# Ruby<br>
passc() {<br>
    pass "$@" | ruby -e 'puts $stdin.gets; warn $stdin.read' | clip-cmd<br>
}<br>
<br>
The metadata is written to stderr instead of stdout, but the same effect<br>
is achieved.<br>
<br>
    guns<br>
<br>
¹ Not implying sed is anyone's favorite scripting language<br>
</blockquote></div><br></div>