[pass] Simple password store

Dashamir Hoxha dashohoxha at gmail.com
Fri Jan 29 16:16:50 CET 2016


On Fri, Jan 29, 2016 at 11:16 AM, Kevin Lyda <kevin at ie.suberic.net> wrote:

> On Fri, Jan 29, 2016 at 9:06 AM Dashamir Hoxha <dashohoxha at gmail.com>
> wrote:
>
>> However the history of commands does not work (getting the previous
>> command with the arrow-up).
>> Also I don't see how to use autocompletion. Any ideas?
>>
>
> If you want history and completion, "read -e" won't work for you. It only
> uses readline defaults with no knobs for you to set to configure it to do
> what you want (set a history file, do completion, etc).
>
> I have no idea why you want to do this since your shell already has
> completion. Not sure of the win here.
>

I want to ask user for the passphrase only once, save it in a variable, and
then enter an infinite loop of asking user what to do and then do it.
Otherwise the passphase would have to be given each time that user wants to
do something.


>
> But if you really want to do it, the tool you'll want to use in rlwrap.
> It's not a standard package, but it does what you want and it's not like
> pass and your tool don't already depend on some non-posix shell stuff
> already.
>

Thanks. It works:
https://github.com/dashohoxha/simple-password-store/commit/d62fd072afc8073e0b40f451f05a62e87377f659#diff-20469e866edf746987e996bebede7bb5L480

I had to some kind of tricks because `read` is an internal bash command,
so this does not work: `rlwrap read command`. I had to do `command=$(rlwrap
read.sh)`
where `read.sh` is just: `read line; echo $line`.

I also tried something like this: `rlwrap bash -c 'read command' `
but then I couldn't get the value of $command.
Can you think of any other way, more simple than the trick above?

Dashamir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20160129/7d88ced9/attachment.html>


More information about the Password-Store mailing list