Skip to content
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

Add support for "secret" command namespace #144

Merged
merged 1 commit into from
Jan 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add support for "secret" command namespace
  • Loading branch information
kkirsche committed Jan 17, 2019
commit 932a8e9276b602432de4d7c11d9dd2f92068fab2
2 changes: 1 addition & 1 deletion cmd/bitwarden.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func init() {
_, err := exec.LookPath(config.Bitwarden.BW)
if err == nil {
// bw is installed
rootCommand.AddCommand(bitwardenCommand)
secretCommand.AddCommand(bitwardenCommand)
persistentFlags := rootCommand.PersistentFlags()
persistentFlags.StringVar(&config.Bitwarden.Session, "bitwarden-session", "", "bitwarden session")
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/lastpass.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func init() {
_, err := exec.LookPath(config.LastPass.Lpass)
if err == nil {
// lpass is installed
rootCommand.AddCommand(lastpassCommand)
secretCommand.AddCommand(lastpassCommand)
}
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/pass.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type PassCommandConfig struct {
var passCache = make(map[string]string)

func init() {
rootCommand.AddCommand(passCommand)
secretCommand.AddCommand(passCommand)
config.Pass.Pass = "pass"
config.addFunc("pass", config.passFunc)
}
Expand Down
13 changes: 13 additions & 0 deletions cmd/secret.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package cmd

import "github.com/spf13/cobra"

var secretCommand = &cobra.Command{
Use: "secret",
Args: cobra.NoArgs,
Short: "Interact with a secret manager",
}

func init() {
rootCommand.AddCommand(secretCommand)
}
2 changes: 1 addition & 1 deletion cmd/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func init() {
_, err := exec.LookPath(config.Vault.Vault)
if err == nil {
// vault is installed
rootCommand.AddCommand(vaultCommand)
secretCommand.AddCommand(vaultCommand)
}
}

Expand Down