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

Doron Behar doron.behar at gmail.com
Wed Feb 7 20:38:33 CET 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
`primary`.

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

In addition, I changed the environmental variable
`$PASSWORD_STORE_X_SELECTION` to `$PASSWORD_STORE_DEFAULT_X_SELECTION`
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
variable.

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(-)

-- 
2.16.1



More information about the Password-Store mailing list