aboutsummaryrefslogtreecommitdiff
path: root/mkshrc
diff options
context:
space:
mode:
authorMitch Riedstra <mitch@riedstra.us>2020-04-04 22:46:35 -0400
committerMitch Riedstra <mitch@riedstra.us>2020-04-04 22:46:35 -0400
commit81de7c27b3dc4195965111f3fdf24b4575152916 (patch)
treeffa86be3970743d5706552a349c766cff4857c0c /mkshrc
parent1219df17b2ffbf0c0c03e684a30929ae9a9bbc2e (diff)
downloaddotfiles-81de7c27b3dc4195965111f3fdf24b4575152916.tar.gz
dotfiles-81de7c27b3dc4195965111f3fdf24b4575152916.tar.xz
Add a little GPG helper for creating throwaway directories
Diffstat (limited to 'mkshrc')
-rw-r--r--mkshrc10
1 files changed, 10 insertions, 0 deletions
diff --git a/mkshrc b/mkshrc
index 4caddc8..6decdf8 100644
--- a/mkshrc
+++ b/mkshrc
@@ -319,6 +319,16 @@ eval _tmux_session -s "\$session" -w "\$working_directory" -n "main" \
}
+gpgTmpDir() {
+ set -x
+ if echo "$GNUPGHOME" | grep -q "/dev/shm/"; then
+ rm -rvf "$GNUPGHOME"
+ fi
+
+ export GNUPGHOME="$(mktemp -d /dev/shm/GPG.XXXXXX)"
+ set +x
+}
+
setcolorterminal() {
case $TERM in
xterm-kitty)