From e3f0e73460ac908b2b09a1eaf9d000a5bd4cec54 Mon Sep 17 00:00:00 2001 From: Mitchell Simon Date: Fri, 30 Aug 2019 20:16:23 -0400 Subject: [PATCH] Add more feedback after performing actions --- sp/commands/create.go | 4 ++++ sp/commands/get.go | 1 + sp/commands/update.go | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/sp/commands/create.go b/sp/commands/create.go index f904665..6722c41 100644 --- a/sp/commands/create.go +++ b/sp/commands/create.go @@ -84,6 +84,7 @@ password.`, if copypass { check(clipboard.WriteAll(ci.Password)) + fmt.Println("Wrote password to clipboard.") } } else { prompt := &survey.Password{Message: "Password: "} @@ -126,6 +127,7 @@ password.`, check(err) check(clipboard.WriteAll(otp)) + fmt.Println("Wrote one time password to clipboard.") prompt = &survey.Confirm{Message: "Anotha one?", Default: true} check(survey.AskOne(prompt, ©otp, nil)) @@ -135,6 +137,7 @@ password.`, check(err) check(clipboard.WriteAll(otp)) + fmt.Println("Wrote one time password to clipboard.") } } } @@ -157,6 +160,7 @@ password.`, if cleancb { check(clipboard.WriteAll(" ")) + fmt.Println("Clipboard cleared.") } }, } diff --git a/sp/commands/get.go b/sp/commands/get.go index c8fb5e4..8f616ee 100644 --- a/sp/commands/get.go +++ b/sp/commands/get.go @@ -88,6 +88,7 @@ decrypting password.`, if cleancb { check(clipboard.WriteAll(" ")) + fmt.Println("Clipboard cleared.") } }, } diff --git a/sp/commands/update.go b/sp/commands/update.go index a212d06..ad874bf 100644 --- a/sp/commands/update.go +++ b/sp/commands/update.go @@ -117,6 +117,7 @@ password.`, if copypass { check(clipboard.WriteAll(ci.Password)) + fmt.Println("Wrote one time password to clipboard.") } } else { prompt := &survey.Password{Message: "Password: "} @@ -160,6 +161,7 @@ password.`, check(err) check(clipboard.WriteAll(otp)) + fmt.Println("Wrote one time password to clipboard.") prompt = &survey.Confirm{Message: "Anotha one?", Default: true} check(survey.AskOne(prompt, ©otp, nil)) @@ -169,6 +171,7 @@ password.`, check(err) check(clipboard.WriteAll(otp)) + fmt.Println("Wrote one time password to clipboard.") } } } @@ -186,6 +189,7 @@ password.`, if cleancb { check(clipboard.WriteAll(" ")) + fmt.Println("Clipboard cleared.") } }, }