diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2025-07-20 18:50:30 -0400 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2025-07-20 18:50:30 -0400 |
| commit | 004db1b9fe33c501907764fe6ecf718afe1bcd92 (patch) | |
| tree | e98ff0ffb032e7c6b684379b11746b18b756257a /executables/bin/get-password | |
| parent | Replace barbar with harpoon / adjust config (diff) | |
| download | dotfiles-004db1b9fe33c501907764fe6ecf718afe1bcd92.zip | |
Add msmtp/isync setup for local email processing via aerc
Diffstat (limited to 'executables/bin/get-password')
| -rwxr-xr-x | executables/bin/get-password | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/executables/bin/get-password b/executables/bin/get-password index ca13d93..3b83bb7 100755 --- a/executables/bin/get-password +++ b/executables/bin/get-password @@ -5,32 +5,32 @@ VAULT="Private" CREDENTIAL="" main() { - parse_args "$@" - op read "op://$VAULT/$CREDENTIAL/password" + parse_args "$@" + op read "op://$VAULT/$CREDENTIAL/password" } parse_args() { - while [ $# -gt 0 ]; do - case "$1" in - --vault) - VAULT="$2" - shift 2 - ;; - --credential) - CREDENTIAL="$2" - shift 2 - ;; - *) - echo "Usage: $0 [--vault <name>] --credential <name>" - exit 1 - ;; - esac - done + while [ $# -gt 0 ]; do + case "$1" in + --vault) + VAULT="$2" + shift 2 + ;; + --credential) + CREDENTIAL="$2" + shift 2 + ;; + *) + echo "Usage: $0 [--vault <name>] --credential <name>" + exit 1 + ;; + esac + done - if [ -z "$CREDENTIAL" ]; then - echo "Invalid or empty CREDENTIAL" >&2 - exit 1 - fi + if [ -z "$CREDENTIAL" ]; then + echo "Invalid or empty CREDENTIAL" >&2 + exit 1 + fi } main "$@" |