2020-03-25 19:26:51 +00:00
|
|
|
# Skip all this for non-interactive shells
|
|
|
|
[[ -z "$PS1" ]] && return
|
|
|
|
|
|
|
|
# Force en_US UTF-8 environment
|
|
|
|
export LC_ALL=en_US.UTF-8
|
|
|
|
export LANG=en_US.UTF-8
|
2016-06-14 19:13:06 +00:00
|
|
|
export LANGUAGE=en_US.UTF-8
|
|
|
|
|
2018-10-23 04:28:31 +00:00
|
|
|
# Terminal Editor
|
|
|
|
export EDITOR=vim
|
|
|
|
|
2016-06-14 19:13:06 +00:00
|
|
|
# Paths
|
2018-10-23 04:20:59 +00:00
|
|
|
export PATH=${HOME}/bin:$PATH:/usr/lib/wine/bin:/sbin:/usr/sbin:/usr/local/bin
|
2018-02-11 01:22:34 +00:00
|
|
|
|
2018-02-11 04:24:17 +00:00
|
|
|
# Give the path to the dotfiles
|
|
|
|
export _DOTFILES="${HOME}/dotfiles"
|
|
|
|
|
2018-02-11 03:36:07 +00:00
|
|
|
# Allow automatic updates
|
2018-02-11 04:02:42 +00:00
|
|
|
export DISABLE_DOTFILES_AUTO_UPDATE="FALSE"
|
2018-02-11 03:36:07 +00:00
|
|
|
|
2018-02-11 05:18:23 +00:00
|
|
|
# Set "true" to update without asking first
|
|
|
|
export DISABLE_DOTFILES_UPDATE_PROMPT="FALSE"
|
|
|
|
|
2018-02-11 04:24:17 +00:00
|
|
|
# Update every 2 weeks (OMZ default)
|
|
|
|
export UPDATE_DOTFILES_DAYS=13
|
|
|
|
|
2018-05-17 00:23:26 +00:00
|
|
|
# Whether or not to automatically connect to a TMUX session when opening the shell
|
2020-03-25 19:26:51 +00:00
|
|
|
export ENABLE_TMUXAC="FALSE"
|
2018-05-17 00:23:26 +00:00
|
|
|
|
|
|
|
# If there is not an active tmux session, we probably want one
|
|
|
|
# Otherwise, the shell will not open the session again (eg. opening tabs, new terminals)
|
|
|
|
if $(tmux list-sessions >> /dev/null 2>&1); then
|
|
|
|
export TMUXATT="TRUE"
|
|
|
|
else
|
|
|
|
export TMUXATT="FALSE"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Automatically attach tmux session "C0DE"
|
2018-05-20 01:11:22 +00:00
|
|
|
if [[ -z "$TMUX" && "$TMUXATT" != "TRUE" && "$ENABLE_TMUXAC" != "FALSE" ]]; then
|
2018-05-17 00:23:26 +00:00
|
|
|
tmux attach -t C0DE || tmux new -s C0DE
|
|
|
|
fi
|
2019-12-13 15:31:53 +00:00
|
|
|
|
|
|
|
# Enable shell-history for interactive shells
|
|
|
|
# https://github.com/pawamoy/shell-history
|
2020-03-02 21:02:14 +00:00
|
|
|
#if [[ $- == *i* ]] && command -v shellhistory-location &>/dev/null; then
|
|
|
|
# . $(shellhistory-location)
|
|
|
|
# shellhistory enable
|
|
|
|
#fi
|