From 0bbc51f35bf2397357b7b44f7a54759e70a7f172 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Sat, 12 May 2012 23:59:56 +0200 Subject: bashrc/main: possibility to start in different directory use $DIR environment variable to start the shell in another directory than the home directory. this is currently used by the emacs quick-open-shell function --- bashrc/main.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bashrc/main.sh b/bashrc/main.sh index 0552035..badbc78 100644 --- a/bashrc/main.sh +++ b/bashrc/main.sh @@ -10,7 +10,11 @@ declare -r _DOTFILES_DIR="${HOME}/.dotfiles" declare -r _BASHRC_DIR="${_DOTFILES_DIR}/bashrc" # start in home dir -cd "${HOME}" +if [[ -n "${DIR}" ]]; then + cd "${DIR}" +else + cd "${HOME}" +fi # self update magic _self_update() { -- cgit v1.2.3