On Fri, Jun 19, 2020 at 10:10:07AM +0800, Adrian Ho wrote: > On 19/6/20 12:51 am, John Franklin wrote: > > On Jun 18, 2020, at 02:46, [email protected] wrote: > >> Is there an equivalent to the -m flag of `pass insert` for `pass > >> generate`? Essentially 100% of the time I want to store my username next > >> to the password in the file, and have to do `pass generate > >> my/password/file` then `pass edit my/password/file`, > >> > > That sounds like it should be an easy patch, and makes a lot of sense, too. > > While we’re at it, are there other flags in insert and generate that could > > be made common between the two? > > In keeping with the Unix philosophy, I'd prefer a `pass new` subcommand > that just generates a new password to stdout:
Does this really belong to `pass`? This command could be used in many different circumstances (including places where pass isn't setup/available). Also `apg` already provides this functionality (although it is unmaintained (and IIRC, the only reason debian still has it in its repos is because there hasn't been a replacement)). So maybe the solution would be to create a solution to `apg` (or just use `apg`). Regards, Nils > > > new [ --no-symbols, -n ] [pass-length] > > > That provides maximum flexibility, and can also be used outside pass. > For the OP's use case: > > > $ pass insert path/to/my/pass/db <<EOF > acct1 $(pass new 16) > acct2 $(pass new 22) > EOF > > > Best Regards, > Adrian > >
