aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.kshrc17
1 files changed, 17 insertions, 0 deletions
diff --git a/.kshrc b/.kshrc
index 2926985..acf43f9 100644
--- a/.kshrc
+++ b/.kshrc
@@ -71,6 +71,23 @@ man() {
sh -c "man '$@' | col -bx | bat -l man"
}
+# Search path for cd(1)
+CDPATH=:$HOME
+
+# Always add below to allow gpg-agent to work correctly
+GPG_TTY=$(tty)
+
+# Enable the use of ssh-agent
+if [ ! -f "$XDG_RUNTIME_DIR/ssh-agent.env" ]; then
+ pkill -f ssh-agent
+fi
+if ! pgrep -u "$USER" ssh-agent > /dev/null; then
+ ssh-agent -t 1h > "$XDG_RUNTIME_DIR/ssh-agent.env"
+fi
+if [ ! -f "$SSH_AUTH_SOCK" ]; then
+ . "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
+fi
+
# Completions
# Display possible interfaces on this machine for ifconfig