madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

add shell aliases
authormartin f. krafft <madduck@madduck.net>
Sat, 2 Nov 2019 07:46:44 +0000 (20:46 +1300)
committermartin f. krafft <madduck@madduck.net>
Sat, 2 Nov 2019 07:46:44 +0000 (20:46 +1300)
.gitignore.d/pass
.zsh/aliases/genpw [new file with mode: 0644]
.zsh/aliases/getpw [new file with mode: 0644]
.zsh/aliases/pmnpw [new file with mode: 0644]

index 8f5d1eb17dace36a444d8619595343e71210a81b..8b3844c1efa5d2857a6167cee2290d6abbf5611c 100644 (file)
@@ -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 (file)
index 0000000..7b9f997
--- /dev/null
@@ -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 (file)
index 0000000..c2dc8a8
--- /dev/null
@@ -0,0 +1 @@
+pass -c
diff --git a/.zsh/aliases/pmnpw b/.zsh/aliases/pmnpw
new file mode 100644 (file)
index 0000000..2ff7e1a
--- /dev/null
@@ -0,0 +1 @@
+() { case "$1" in (*@*) genpw ${1%%@*}/$1;; (*) genpw $1/${1}@pobox.madduck.net ${@:2};; esac }