Skip to content
This repository has been archived by the owner on Nov 9, 2019. It is now read-only.

Add pass command #114

Merged
merged 3 commits into from Feb 26, 2017
Merged

Add pass command #114

merged 3 commits into from Feb 26, 2017

Conversation

leonklingele
Copy link
Collaborator

This is useful when you want to generate a password without storing it

@leonklingele
Copy link
Collaborator Author

Based on #113, please merge that one before.

runCommand(Pass, cmd, args)
},
}
cmd.Flags().Int("length", pswdgen.DefaultPasswordLength, "the length of the generated password")
Copy link
Owner

@bndw bndw Feb 14, 2017

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.

Copy link
Collaborator Author

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.

Copy link
Owner

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.

Copy link
Collaborator Author

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

Copy link
Owner

@bndw bndw Feb 25, 2017

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

Copy link
Owner

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?

Copy link
Collaborator Author

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 😸

Copy link
Owner

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.

Copy link
Collaborator Author

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.

Copy link
Owner

@bndw bndw Feb 26, 2017

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. :)

@leonklingele
Copy link
Collaborator Author

leonklingele commented Feb 26, 2017 via email

@bndw bndw merged commit 88ec8d1 into bndw:develop Feb 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants