]> code.delx.au - dotfiles/blobdiff - .bash/environment
tern-config
[dotfiles] / .bash / environment
index 924a595d0014960ba0c7c4d6d020777ea1fa58fd..8ccb665fe8e95f00fd7d5565f696e39ab7f286d2 100644 (file)
@@ -19,30 +19,27 @@ export EMAIL="James Bunton <jamesbunton@delx.net.au>"
 # Editor settings
 if emacsclient --version &> /dev/null; then
     export ALTERNATE_EDITOR="vim"
-    export EDITOR="emacsclient --create-frame"
-    export EDITORBG="emacsclient --create-frame --no-wait"
+    export EDITOR="emacsclient --tty"
 
-    # Disable emacs inside screen
     if [[ "$TERM" == screen* ]]; then
-        export EMACS_SERVER_FILE=
+        export EDITORBG="$EDITOR"
+    else
+        export EDITORBG="emacsclient --create-frame --no-wait"
     fi
 else
     export EDITOR="vim"
     export EDITORBG="vim"
 fi
 
-# Expand any symbolic links in the TMPDIR environment variable
-[ -n "$TMPDIR" ] && export TMPDIR="$(cd "${TMPDIR}" && pwd -P)"
-
-# Load the bash functions
 source "${HOME}/.bash/functions"
 
-# The current directory shouldn't be in the path
-pathremove .
+pathprepend "${HOME}/bin"
+
+# Pick up SSH agent socket in case it isn't set automatically
+if [ -z "$SSH_AUTH_SOCK" ]; then
+    export SSH_AUTH_SOCK="/run/user/$(id -u)/keyring/ssh"
+fi
 
 # Load local environment settings
 [ -r "${HOME}/.bash/environment_local" ] && source "${HOME}/.bash/environment_local"
 
-# ~/bin should be in the front of path if it exists
-pathprepend "${HOME}/bin"
-