<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi,<br>
this looks like a great idea!<br>
<br>
On the code itself: it looks fine to me, but I would replace the
backticks with $(), as that style is used everywhere else in pass.<br>
<br>
But at the moment, I think there are some concerns that may keep
it from getting integrated (but this is just guesswork, I'm not
the maintainer)<br>
* it introduces a new dependency: oathtool <br>
* it introduces a new file name convention which impacts other
commands<br>
* it moves a bit away from the "only one functionality" thing
pass does otherwise.<br>
<br>
My thought on this is (and yes, I'm conquering your thread a bit
with this, sorry):<br>
This might be a perfect example for a used-defined command hook. <br>
We have been discussing this idea a few days ago (take a look at
the archive:
<a class="moz-txt-link-freetext" href="http://lists.zx2c4.com/pipermail/password-store/2015-August/thread.html#1659">http://lists.zx2c4.com/pipermail/password-store/2015-August/thread.html#1659</a>
).<br>
<br>
The gist of it is: you create a script with contents like<br>
<br>
#!/bin/bash<br>
OTP_OPTS=( $PASSWORD_STORE_OTP_OPTS "--base32" "-w 3" "--totp"
)<br>
OTP="oathtool"<br>
<span class="blob-code-inner"><span class="pl-smi"> $OTP</span>
<span class="pl-s"><span class="pl-pds">"</span><span
class="pl-smi">${OTP_OPTS[@]}</span><span class="pl-pds">"</span></span>
<span class="pl-s">$(<span class="pl-smi">cmd_show "$@" | head
-n1</span><span class="pl-pds">)</span></span></span><br>
<br>
save it as '~/.password-store/.subcommand_hooks/otp', make it
executable and sign it and it would be available as<br>
pass otp <password-name><br>
<br>
If you like the idea and want to do some testing, I'm desperately
waiting for feedback ;)<br>
<br>
Regards,<br>
Lenz<br>
<br>
<br>
<br>
Am 05.08.2015 um 13:50 schrieb admin:<br>
</div>
<blockquote cite="mid:55C1F884.3030904@lesderniersdelaclasse.pw"
type="cite">
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
<font face="Ubuntu">Hello,<br>
I'm apologize for my poor english and my bad code... But I tried
to add a functionality to allow password-store to generate a
time otp. It's very useful for websites requesting a 2FA totp
like google or github. See my fork of the master github
password-store :<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://github.com/Gambiit/password-store">https://github.com/Gambiit/password-store</a><br>
Thanks a lot for password-store, Best regards :)</font> <br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Password-Store mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Password-Store@lists.zx2c4.com">Password-Store@lists.zx2c4.com</a>
<a class="moz-txt-link-freetext" href="http://lists.zx2c4.com/mailman/listinfo/password-store">http://lists.zx2c4.com/mailman/listinfo/password-store</a>
</pre>
</blockquote>
<br>
</body>
</html>