dotfiles/files/.bashrc

76 lines
2 KiB
Bash
Raw Permalink Normal View History

2016-09-04 13:58:13 +02:00
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
#if [ -f "$HOME/.at_login" ]; then
# /bin/bash "$HOME/.at_login"
#fi
2020-10-05 14:37:41 +02:00
if [ -n "$PS1" ]; then
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
2016-09-04 13:58:13 +02:00
2020-10-05 14:37:41 +02:00
# append to the history file, don't overwrite it
shopt -s histappend
2016-09-04 13:58:13 +02:00
2020-10-05 14:37:41 +02:00
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
2016-09-04 13:58:13 +02:00
2020-10-05 14:37:41 +02:00
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
2016-09-04 13:58:13 +02:00
2020-10-05 14:37:41 +02:00
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
2016-09-04 13:58:13 +02:00
2020-10-09 15:13:49 +02:00
if [ -f /usr/share/bash_completion ] && ! shopt -oq posix; then
. /usr/share/bash_completion
2020-10-05 14:37:41 +02:00
fi
2016-09-04 13:58:13 +02:00
2020-10-05 14:37:41 +02:00
[ -f ~/.bash_ps1 ] && source ~/.bash_ps1
2016-09-04 13:58:13 +02:00
2020-10-05 14:37:41 +02:00
# Autojump
[ -f /etc/profile.d/autojump.bash ] && source /etc/profile.d/autojump.bash
2016-09-04 13:58:13 +02:00
fi
[ -f ~/.bash_sshagent ] && source ~/.bash_sshagent
2020-10-05 14:37:41 +02:00
# Aliases
[ -f ~/.bash_aliases ] && source ~/.bash_aliases
2016-09-04 13:58:13 +02:00
export GTK_IM_MODULE=xim
export EDITOR=/usr/bin/vim
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'
2017-03-06 23:55:00 +01:00
export ANDROID_HOME=/opt/android-sdk
2016-09-04 13:58:13 +02:00
2020-10-05 14:37:41 +02:00
export PATH="$PATH:$HOME/bin"
2016-10-31 16:51:09 +01:00
export MANPATH="$MANPATH:$HOME/local/man"
2016-09-04 13:58:13 +02:00
export TERMINAL="/usr/bin/terminator"
2016-10-31 16:51:09 +01:00
export LC_REALUSER='tbastian'
2016-09-04 13:58:13 +02:00
# Opam
2018-10-23 10:21:50 +02:00
which opam > /dev/null 2>&1 && [ -d ~/.opam ] && eval $(opam config env)
2017-06-18 14:04:13 +02:00
# Gem
2020-03-25 18:05:36 +01:00
gempath="$HOME/.gem/ruby"
if [ -d "$gempath" ] && [ "$(ls -1 $gempath | wc -l)" -gt 0 ]
then
cur_version=$(ls -1t $gempath | head -n 1)
cur_path="$gempath/$cur_version/bin"
export PATH="$PATH:$cur_path"
2017-06-18 14:04:13 +02:00
fi
2020-03-25 18:05:36 +01:00
unset gempath
2020-10-05 14:37:41 +02:00
# pip
export PATH="$PATH:$HOME/.local/bin"
# Go
export GOPATH="$HOME/.go"
export PATH="$PATH:$HOME/.go/bin"