From a358236ea029464ce74ffe97ddb353685074666f Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Sat, 2 Nov 2019 20:46:44 +1300 Subject: [PATCH] add shell aliases --- .gitignore.d/pass | 3 +++ .zsh/aliases/genpw | 1 + .zsh/aliases/getpw | 1 + .zsh/aliases/pmnpw | 1 + 4 files changed, 6 insertions(+) create mode 100644 .zsh/aliases/genpw create mode 100644 .zsh/aliases/getpw create mode 100644 .zsh/aliases/pmnpw diff --git a/.gitignore.d/pass b/.gitignore.d/pass index 8f5d1eb..8b3844c 100644 --- a/.gitignore.d/pass +++ b/.gitignore.d/pass @@ -1,2 +1,5 @@ * !/.gitignore.d/pass +!/.zsh/aliases/genpw +!/.zsh/aliases/getpw +!/.zsh/aliases/pmnpw diff --git a/.zsh/aliases/genpw b/.zsh/aliases/genpw new file mode 100644 index 0000000..7b9f997 --- /dev/null +++ b/.zsh/aliases/genpw @@ -0,0 +1 @@ +() { EDITOR="vim -c 'set noshelltemp' -c '0read! diceware -s ${2:-1}' -c 2d -n" pass edit "$1"; } diff --git a/.zsh/aliases/getpw b/.zsh/aliases/getpw new file mode 100644 index 0000000..c2dc8a8 --- /dev/null +++ b/.zsh/aliases/getpw @@ -0,0 +1 @@ +pass -c diff --git a/.zsh/aliases/pmnpw b/.zsh/aliases/pmnpw new file mode 100644 index 0000000..2ff7e1a --- /dev/null +++ b/.zsh/aliases/pmnpw @@ -0,0 +1 @@ +() { case "$1" in (*@*) genpw ${1%%@*}/$1;; (*) genpw $1/${1}@pobox.madduck.net ${@:2};; esac } -- 2.39.5