-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve pws subcommand #139
Comments
Hi @robinkrahl, your suggestions sound fine to me. It seems as if we should make |
It seems as if we should make `pws update --password` also work with
stdin then, though, should we?
True, good point!
|
Is there some fundamental difference in OTP handling that we don't provide a similar interface there? |
No, that would be my next step. I started with the PWS because the commands are more complex and data loss might hurt more. |
It seems as if this issue can be closed, correct? From what I can tell #163 was the last outstanding issue. Or is there something else missing, Robin? |
I also intended to add a password prompt. Just reading from stdin is fine for piping, but if the user wants to manually type the password, it’s a bit awkward. |
Last week, I've used the PWS functionality for the first time with real data. I had some issues with our current PWS commands:
pws status
), keep track of the first unprogrammed slot and then callpws set
.pws set
command instead of just listing the information to update.So I suggest to replace the current
pws set
command with:pws set [--overwrite] <slot> <name> <login> [<password>|-]
. If the password is set to-
, it is read from stdin. If it is not set, it is prompted from the user. Unless--overwrite
(or--force
?) is set, this makes sure that the slot is currently unprogrammed to avoid accidental data loss.pws add <name> <login> [<password>|-]
. The same aspws set
, but it queries the first unprogrammed slot and writes the data to this slot.pws update <slot> [--name <name>] [--login <login>] [--password <password>]
. Overwrites the given data on the given slot without changing the other fields.If we want to be even more interactive, we could also make the
slot
,name
andlogin
arguments optional and prompt them from the user if not set.@d-e-s-o What do you think?
Tracking:
pws add
subcommand (Add pws add subcommand #151)pws update
subcommand (Add pws update subcommand #150)--slot
option topws add
(Add --slot option to pws add #158)pws set
command (Remove pws set #162)The text was updated successfully, but these errors were encountered: