Feature Suggestion / discussion: add a command line option for xclip's clipboard selection in addition / instead of $PASSWORD_STORE_X_SELECTION

2018-02-03 Thread Doron Behar
Hello dear community,

After a long time I have been using `pass`, I have read the man page and
read about the respected environmental variable
`$PASSWORD_STORE_X_SELECTION` and I wondered to myself why isn't there a
quick command line option instead of it. Most of the time, I use the
default `$X_SELECTION` `clipboard` because this is what my browser
accepts. Sometimes though, I need to copy a password to insert into a
terminal with `Shift+Insert` and my terminal emulator it is using the
`primary` clipboard for it.

Wouldn't it be great if the defaults would be kept the same and we could
choose with a quickly typed command line option to use the `primary`
clipboard? How about `-C` instead of `-c` for `primary` instead of
`clipboard`.

I'd also like to know what attitude to take on this matter, whether a
new option `-C` in addition to `-c` will be proper, and perhaps keeping
`$PASSWORD_STORE_X_SELECTION` for the default (`-c`) `clipboard`
selection, or perhaps using a new option `-s` / `--selection` will be
better?

I'll be glad to know what do you think and whether it will be worth my
time.


signature.asc
Description: PGP signature
___
Password-Store mailing list
Password-Store@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/password-store


Re: Feature Suggestion / discussion: add a command line option for xclip's clipboard selection in addition / instead of $PASSWORD_STORE_X_SELECTION

2018-02-03 Thread Celti Burroughs
On Sat, 3 Feb 2018 20:16:32 +0200
Doron Behar  wrote:
> Wouldn't it be great if the defaults would be kept the same and we
> could choose with a quickly typed command line option to use the
> `primary` clipboard? How about `-C` instead of `-c` for `primary`
> instead of `clipboard`.
> 
> I'd also like to know what attitude to take on this matter, whether a
> new option `-C` in addition to `-c` will be proper, and perhaps
> keeping `$PASSWORD_STORE_X_SELECTION` for the default (`-c`)
> `clipboard` selection, or perhaps using a new option `-s` /
> `--selection` will be better?

And what does -C or -s do on a non-X11 platform? MacOS doesn't even have
a primary selection. Neither does Windows. It's a bit rude to have a
command-line option like that that's only functional on one supported
platform.

If it's the amount of typing you're worried about, why not write a
quick bash function that wraps pass with the environment variable?

~Celti


pgpztbfV2me4C.pgp
Description: OpenPGP digital signature
___
Password-Store mailing list
Password-Store@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/password-store


Re: Feature Suggestion / discussion: add a command line option for xclip's clipboard selection in addition / instead of $PASSWORD_STORE_X_SELECTION

2018-02-03 Thread Radon Rosborough
> How about `-C` instead of `-c` for `primary` instead of `clipboard`.

It is frequently a convention to use `-C ` to have the program switch
to a different directory before running. See `git -C`, `make -C`, etc.
There's been discussion on this list of making `pass -C` do the same, so
I'd advise against using the flag for something else.
___
Password-Store mailing list
Password-Store@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/password-store


Re: Feature Suggestion / discussion: add a command line option for xclip's clipboard selection in addition / instead of $PASSWORD_STORE_X_SELECTION

2018-02-03 Thread Doron Behar
You have a good point here, I guess that in your opinion it will be best
to use a completely different flag like `-s` | `--selection`.

On Sat, Feb 03, 2018 at 12:04:39PM -0800, Radon Rosborough wrote:
> > How about `-C` instead of `-c` for `primary` instead of `clipboard`.
> 
> It is frequently a convention to use `-C ` to have the program switch
> to a different directory before running. See `git -C`, `make -C`, etc.
> There's been discussion on this list of making `pass -C` do the same, so
> I'd advise against using the flag for something else.

> ___
> Password-Store mailing list
> Password-Store@lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/password-store



signature.asc
Description: PGP signature
___
Password-Store mailing list
Password-Store@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/password-store


Re: Feature Suggestion / discussion: add a command line option for xclip's clipboard selection in addition / instead of $PASSWORD_STORE_X_SELECTION

2018-02-03 Thread Doron Behar
That's an interesting point, I wonder what will be the best way to
implement this.

At first, I _was_ thinking of a shell function to wrap the whole thing
up, but than I thought to my self that perhaps this clipboard selection
issue was taken care of purely with the `$PASSWORD_STORE_X_SELECTION`
env variable. IMO, it could have been solved better and more comfortably
with a new command line option.

Plus, perhaps the fact that a certain command line option makes a
difference only on certain platforms isn't that bad.. Why would it
matter for MacOS users to read on a man page that a certain option makes
a difference only on Linux? I think it will best suit to make the option
`-C` ignored or equivalent to `-C` on MacOS machines.

On Sat, Feb 03, 2018 at 11:36:54AM -0700, Celti Burroughs wrote:
> On Sat, 3 Feb 2018 20:16:32 +0200
> Doron Behar  wrote:
> > Wouldn't it be great if the defaults would be kept the same and we
> > could choose with a quickly typed command line option to use the
> > `primary` clipboard? How about `-C` instead of `-c` for `primary`
> > instead of `clipboard`.
> > 
> > I'd also like to know what attitude to take on this matter, whether a
> > new option `-C` in addition to `-c` will be proper, and perhaps
> > keeping `$PASSWORD_STORE_X_SELECTION` for the default (`-c`)
> > `clipboard` selection, or perhaps using a new option `-s` /
> > `--selection` will be better?
> 
> And what does -C or -s do on a non-X11 platform? MacOS doesn't even have
> a primary selection. Neither does Windows. It's a bit rude to have a
> command-line option like that that's only functional on one supported
> platform.
> 
> If it's the amount of typing you're worried about, why not write a
> quick bash function that wraps pass with the environment variable?
> 
> ~Celti



> ___
> Password-Store mailing list
> Password-Store@lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/password-store



signature.asc
Description: PGP signature
___
Password-Store mailing list
Password-Store@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/password-store