New passmenu option to type username and copy password
John Gliksberg
jg.trosh at gmail.com
Mon Apr 24 19:02:29 CEST 2017
On Mon, 24 Apr 2017 17:38:55 +0200
Kjetil Torgrim Homme <kjetil.homme at redpill-linpro.com> wrote:
> replacing bashisms with an (undocumented) reliance on GNU find
> (-printf) isn't a good idea IMHO.
Well spotted, thanks.
Here's an updated patch, tested in busybox.
The interesting bit:
-password=$(printf '%s\n' "${password_files[@]}" | dmenu)
+password="$(find "$prefix" -type f -name '*.gpg' -print \
+ | sed "s#^$prefix/##;s/\.gpg$//" | dmenu)"
Don't know if it's any more worthwhile than before, but at least
it's not GNU dependent.
Addendum:
I suppose this might not deal properly with newlines, when it is
technically possible to insert entries containing newlines
(something like `pass insert $'foo\nbar'`).
However dmenu takes in a newline-separated list of values, so AFAIK
there's no good way to write and read newlines (or a substitute)
to and from dmenu.
This is also the current behaviour in master, for passmenu and shell
completion (bash: $'foo\nbar' -> 'f' can complete as 'foo' or 'bar',
zsh: $'foo\nbar' -> 'f' can complete as 'foo' and 'b' as 'bar').
Best,
--
John Gliksberg
==============
0033640607695
PhD Bull BXI, UVSQ & UCLM
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-passmenu-Remove-bashisms.patch
Type: text/x-patch
Size: 1829 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20170424/f8fd3dee/attachment.bin>
More information about the Password-Store
mailing list