2023-03-09 20:47:19 -06:00
|
|
|
case "$-" in
|
|
|
|
*i*) echo This shell is interactive ;;
|
|
|
|
*) return ;;
|
|
|
|
esac
|
|
|
|
|
2023-03-09 17:22:59 -06:00
|
|
|
# set -x
|
|
|
|
|
|
|
|
# Some more alias to avoid making mistakes:
|
|
|
|
alias rm='rm -i'
|
|
|
|
alias cp='cp -i'
|
|
|
|
alias mv='mv -i'
|
|
|
|
|
|
|
|
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
|
|
|
. /etc/bash_completion
|
|
|
|
fi
|
|
|
|
|
|
|
|
export WIT_BASH=true
|
|
|
|
export WIT_USER=$LC_USER
|
|
|
|
if [ "x$WIT_USER" == "x" ]; then
|
|
|
|
export WIT_USER=$USER
|
|
|
|
fi
|
|
|
|
|
2023-03-09 20:19:16 -06:00
|
|
|
|
|
|
|
# export PS1='\h:\w\$ '
|
|
|
|
umask 022
|
|
|
|
export LESS="-XR"
|
|
|
|
# export LESS="-XFR"
|
|
|
|
# -F makes less exit if the file is short
|
|
|
|
|
|
|
|
unset PAGER
|
|
|
|
set +o ignoreeof
|
|
|
|
export LS_OPTIONS='--color=auto'
|
|
|
|
eval `dircolors`
|
|
|
|
alias ls='ls $LS_OPTIONS'
|
|
|
|
alias ll='ls $LS_OPTIONS -lh'
|
|
|
|
alias lf='ls $LS_OPTIONS -aCF'
|
|
|
|
alias l='ls $LS_OPTIONS -lA'
|
|
|
|
#
|
|
|
|
# Some more alias to avoid making mistakes:
|
|
|
|
alias rm='rm -i'
|
|
|
|
alias cp='cp -i'
|
|
|
|
alias mv='mv -i'
|
|
|
|
|
|
|
|
alias pa='ps auxwH -L kstart_time'
|
|
|
|
alias psc='ps xawf -eo pid,user,cgroup,args'
|
|
|
|
alias lstree='lsusb --tree -v'
|
|
|
|
alias last='last -a'
|
|
|
|
alias vi='vim -u ~/.config/vimrc'
|
|
|
|
alias vim='vim -u ~/.config/vimrc'
|
|
|
|
|
|
|
|
alias apt-find="apt-file search"
|
|
|
|
|
|
|
|
export LANG=C
|
|
|
|
export LANGUAGE=C
|
|
|
|
export LC_ALL=C
|
|
|
|
|
|
|
|
# setterm -blength 0
|
|
|
|
|
|
|
|
if [ $DISPLAY ] ; then
|
|
|
|
xset b off
|
|
|
|
fi
|
|
|
|
|
|
|
|
export EDITOR=vim
|
|
|
|
unset VIMINIT
|
|
|
|
|
|
|
|
stty -echoctl
|
|
|
|
|
|
|
|
# this magic makes less work with .gz files
|
|
|
|
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
|
|
|
|
|
|
|
# export PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
|
|
|
|
|
|
|
if [ -d ~/.config/wit/ ]; then
|
2023-04-13 08:15:56 -05:00
|
|
|
echo -n "git.wit.org/wit/bash "
|
2023-03-09 20:19:16 -06:00
|
|
|
cd ~/.config/wit/ && git pull
|
|
|
|
cd
|
|
|
|
sleep 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $? == 0 ]; then
|
2023-04-12 12:36:08 -05:00
|
|
|
neofetch --cpu_temp C --battery_display infobar
|
2023-03-09 20:19:16 -06:00
|
|
|
fi
|
|
|
|
|
2023-03-09 20:47:19 -06:00
|
|
|
|
|
|
|
# read in custom bash settings if you want
|
|
|
|
case "$WIT_USER" in
|
|
|
|
jcarr2)
|
|
|
|
. ~/jcarr/bashrc/.jcarr
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
if [ -f ~/$WIT_USER/bashrc/.$WIT_USER ] && ! shopt -oq posix; then
|
|
|
|
. ~/$WIT_USER/bashrc/.$WIT_USER
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2023-03-09 20:19:16 -06:00
|
|
|
if [[ $(type -t _git_wit) == function ]]; then
|
2023-04-13 08:12:57 -05:00
|
|
|
# echo "wit bash completion already exists"
|
|
|
|
true
|
2023-03-09 20:19:16 -06:00
|
|
|
else
|
|
|
|
echo "should add wit bash completion here"
|
|
|
|
fi
|