-
Notifications
You must be signed in to change notification settings - Fork 29
Conversation
Based on #113, please merge that one before. |
dea5184
to
fcdad9e
Compare
7c4a67d
to
64a1701
Compare
64a1701
to
816bef3
Compare
runCommand(Pass, cmd, args) | ||
}, | ||
} | ||
cmd.Flags().Int("length", pswdgen.DefaultPasswordLength, "the length of the generated password") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add a mode
flag in addition.
Example: I have my config set to interactive and I'd like to override that when generating a one-off password.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should always use the non-interactive mode if you are about to generate more than 1 password, and the non-interactive mode otherwise.
I think this is fine and introducing a new flag just makes everything more complicated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could have sworn it went into interactive mode on me when I was testing last night- I'll confirm this evening.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any news on this? It works perfectly fine for me :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pass
command is definitely using interactive mode for me:
$ grep mode ~/.pick/config.toml
# Specifies the mode to generate new passwords, currently supported: "interactive".
mode = "interactive"
$ git checkout -b leonklingele-add-pass-command develop
$ git pull https://github.com/leonklingele/pick.git add-pass-command
$ make build
$ ./bin/pick pass
Entering interactive password generation mode
- Increase character set via: Up-arrow key / "k"
- Decrease character set via: Down-arrow key / "j"
- Increase length via: Right-arrow key / "l"
- Decrease length via: Left-arrow key / "h"
- Use current password: Enter key
'}.3'~#`qS]~f(IU}LVp:'[fJ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My desire is to use the pass
command to generate single, one-time use passwords in non-interactive mode. However, when I use the add
command I prefer interactive mode.
Do you have a suggested configuration/usage to achieve that use case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pick pass --num 2 | head -n 1
😸
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And that's my issue. I frequently need to generate passwords and that's something pick should be able to provide natively.
I think making pass
default to non-interactive is the way forward, but we'll need some way to override it, maybe a boolean --interactive
flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then what should happen on pick pass --num 100 --interactive
?
I still think adding a new flag makes things much more complicated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree the introduction of an --interactive
flag affects other flags. How about this- let's ship this feature as is. If the interactive bit becomes a painpoint in my usage, I'll open an issue and we can revisit the defaults/controls for the pass
command. :)
Sounds good!
|
This is useful when you want to generate a password without storing it