[PATCH 0/6] Add new option: --next-clip,-C for commands: `generate`,`show` that will enable using an alternative clipboard than the default

Tobias Girstmair junkgir-passwd at yahoo.de
Thu Feb 8 00:36:29 CET 2018

I'm confused as to why this patch comes to be. Using the env.var works quite well to set which selection pass shall use. (e.g. `PASSWORD_STORE_X_SELECTION=primary pass -c git` puts my git password into the primary (== middle click) selection as expected)

about the patch itself:
- renaming the env.var seems (to me) more trouble than it's worth, as it'll break many `.${SHELL}rc` files, while not providing much extra value
- the parameter `--next-clip` isn't named self-explainatory (why not something with `primary` in the name?)
- I have to admit that i've just glanced over that patch, but are you `shift`ing out the argument? I've noticed for example "Copied $2 "... changing into "Copied $3"...

I'm against this patch, mostly because I believe that most people are just using one of the two clipboards/selections, and that is better set using an alias. (I'd be glad to be proven wrong through)


greetings, tobias

Doron Behar <doron.behar at gmail.com> schrieb am 20:40 Mittwoch, 7.Februar 2018:

A few days ago I asked in this mailing list whether anyone would be
interested in a new option for `cmd_show()` (the default command) and
`cmd_generate()` that will enable users to use the **non-default**
clipboard in these commands - meaning that if someone usually uses the
`clipboard` selection, with the new option he will be able to use

In this implementation I added the options `-C,--next-clip` to the
commands `cmd_show()` `cmd_generate()`.

In addition, I changed the environmental variable
because after these changes, (since the clipboard can be changed in the
command line) an environmental variable like this should tell `pass`
only the *default* choice. If backwards incompatibility is a problem in
my implementation I guess we can revert and use the old environmental

There is still some work left to do - documentation and shell
completion, but I would like to know your responses before completing
these tasks.

Commits summary:

Doron Behar (6):
  Don't evaluate a global X_SELECTION variable.
  Decide what clipboard to use in `clip()`.
  Add all of `nextclip` variable where relevant.
  Add the new option to `getopt`'s invocations.
  Add new option to usage.
  Small fix to `cmd_show()` getopt usage.

src/password-store.sh | 56 +++++++++++++++++++++++++++++++++++----------------
1 file changed, 39 insertions(+), 17 deletions(-)


Password-Store mailing list
Password-Store at lists.zx2c4.com

More information about the Password-Store mailing list