]> code.delx.au - dotfiles/blobdiff - .bash/environment
bash: reorder initialisation
[dotfiles] / .bash / environment
index 2956ea31ad28d2c9e16d93404680435f82ecf28a..63a760b2053b81187a85ce5fae9a5291de365538 100644 (file)
@@ -19,23 +19,22 @@ 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 EDITOR="emacsclient --tty"
+
+    if [[ "$TERM" == screen* ]]; then
+        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"
 
 # 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"
-