From: martin f. krafft Date: Sat, 2 Nov 2019 07:46:44 +0000 (+1300) Subject: add shell aliases X-Git-Url: https://git.madduck.net/etc/pass.git/commitdiff_plain/a358236ea029464ce74ffe97ddb353685074666f?ds=inline add shell aliases --- 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 }