summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjetil Orbekk <kjetil.orbekk@gmail.com>2016-04-05 10:41:04 -0400
committerKjetil Orbekk <kjetil.orbekk@gmail.com>2016-04-05 10:41:04 -0400
commit00e7476c6403405d64bc22ca673b106cb3e3ee04 (patch)
treeec59dde9e0e23f7182dc39b6c3f98be9a8b3ac0f
parent0d38d06b605b0f9e1cfb7062f5e8c9733f63ba75 (diff)
Set up sudo askpass.
-rwxr-xr-xbin/askpass.sh2
-rwxr-xr-xzshrc3
2 files changed, 5 insertions, 0 deletions
diff --git a/bin/askpass.sh b/bin/askpass.sh
new file mode 100755
index 0000000..d4b2566
--- /dev/null
+++ b/bin/askpass.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+pass show machine/$(hostname)
diff --git a/zshrc b/zshrc
index cbf6bdc..d657782 100755
--- a/zshrc
+++ b/zshrc
@@ -79,3 +79,6 @@ function get-parent-dir() {
}
zle -N get-parent-dir
bindkey "^[u" get-parent-dir
+
+alias sudo="sudo -A"
+SUDO_ASKPASS="$HOME/bin/askpass.sh"