forked from adek05/ConsoleEnvironment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bashrc
87 lines (72 loc) · 2.57 KB
/
bashrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
stty stop undef
stty start undef
# Author godlygeek from #vim @freenode
# Set $TERM for libvte terminals that set $TERM wrong (like gnome-terminal)
{
[ "_$TERM" = "_xterm" ] && type ldd && type grep && type tput && [ -L "/proc/$PPID/exe" ] && {
if ldd /proc/$PPID/exe | grep libvte; then
if [ "`tput -Tgnome-256color colors`" = "256" ]; then
TERM=gnome-256color
elif [ "`tput -Txterm-256color colors`" = "256" ]; then
TERM=xterm-256color
elif tput -T gnome; then
TERM=gnome
fi
fi
}
} >/dev/null 2>/dev/null
# Check for an interactive session
[ -z "$PS1" ] && return
# Regular aliases
alias mim='ssh -x [email protected]'
alias mimvnc='vncviewer students.mimuw.edu.pl:3'
# Color output
alias ls='ls --color=auto'
alias pacman='pacman-color'
alias grep='grep -n --color=auto'
# Less coloring
export LESSCOLOR="yes"
export LESSOPEN="| /usr/bin/source-highlight-esc.sh %s"
export LESS=' -R '
# Dir colors - setting are in /etc/dircolors
eval `dircolors -b ~/.console_env/dircolors_config`
# Color manpages
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'
# Lovely prompt when in git repository - No more used when powerline-bash is on
# function parse_git_dirty {
# [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
# }
# function parse_git_branch {
# git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/(\1$(parse_git_dirty))/"
# }
#
# export PS1='\e[1;32m[\u@\e[1;34m\h \e[1;34m\W]\e[1;35m$(parse_git_branch)\e[0m $ '
function _update_ps1()
{
export PS1="$(~/.console_env/powerline-bash.py $?)"
}
export PROMPT_COMMAND="_update_ps1"
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/adek/.local/bin
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/adek/.local/bin:/home/adek/.local/bin
# Bash history
HISTCONTROL=ignoredups
# E.g. for svn
export SVN_EDITOR=vim
# Make "g++" command call colorgcc
export PATH="/usr/lib/colorgcc/bin:$PATH"
# Tell ccache to invoke compilers in /usr/bin
export CCACHE_PATH="/usr/bin"
# Mim account
export [email protected]
# More aliases
alias gcc='gcc -Wextra -Wall'
alias g++='g++ -Wextra -Wall'
alias g++11='g++ -std=c++11 -Wextra -Wall'
# Django stuff
# export DJANGO_SETTINGS_MODULE=mysite.settings