aboutsummaryrefslogtreecommitdiffstats
path: root/home-dots/dot-bashrc
diff options
context:
space:
mode:
Diffstat (limited to 'home-dots/dot-bashrc')
-rw-r--r--home-dots/dot-bashrc23
1 files changed, 14 insertions, 9 deletions
diff --git a/home-dots/dot-bashrc b/home-dots/dot-bashrc
index aefd08b..5488946 100644
--- a/home-dots/dot-bashrc
+++ b/home-dots/dot-bashrc
@@ -5,17 +5,17 @@
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
+# If emacs tramp or eshell, don't execute any of this
+[[ $TERM == "dumb" ]] && return
HISTSIZE=-1
HISTFILESIZE=-1
+HISTCONTROL=ignorespace
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
- test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
+ # test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
- #alias dir='dir --color=auto'
- #alias vdir='vdir --color=auto'
-
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
@@ -34,10 +34,11 @@ git_current_branch() {
echo "  ${ref#refs/heads/}"
}
+[[ -f /usr/bin/virtualenvwrapper_lazy.sh ]] && source /usr/bin/virtualenvwrapper_lazy.sh
python_current_venv() {
local orange="\[\e[0;91m\]"
- if [[ -n ${VIRTUAL_ENV_PROMPT} ]]; then
- echo " ${orange}${VIRTUAL_ENV_PROMPT}"
+ if [[ -n ${VIRTUAL_ENV} ]]; then
+ echo " ${orange} $(basename "${VIRTUAL_ENV}")"
fi
}
@@ -66,9 +67,12 @@ PROMPT_COMMAND=__prompt_command
export EDITOR='emacsclient'
# GPG agent with ssh
-unset SSH_AGENT_PID
-if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
- export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
+if [ -z "$SSH_CLIENT" ]; then
+ unset SSH_AGENT_PID
+ if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
+ SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
+ export SSH_AUTH_SOCK
+ fi
fi
# For python lsp
@@ -78,5 +82,6 @@ alias isrun='ps -ae | grep'
alias gdimg='git difftool -t image_diff'
alias G='grep -i'
alias lar='ls -lahrt'
+alias ssh='TERM=xterm-256color ssh'
alias emacs='TERM=xterm-direct emacs'
alias mykeys='setxkbmap -I$HOME/.config/xkb/ oscar -option caps:escape -print | xkbcomp -I$HOME/.config/xkb/ - $DISPLAY'