-
Notifications
You must be signed in to change notification settings - Fork 0
/
bash.linux
51 lines (38 loc) · 1.33 KB
/
bash.linux
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
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
##### Exports #####
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"' # sets tab and window titles
export PS1="\[\e[37m\][\[\e[m\]\[\e[34m\]\u\[\e[m\]@\[\e[37m\]\h\[\e[m\]\[\e[37m\]]\[\e[m\] \[\e[31m\]\W\[\e[m\] \[\e[37m\]\\$\[\e[m\] "
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
export HISTSIZE=32768
export HISTFILESIZE=$HISTSIZE
export HISTCONTROL=ignoredups
export HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help"
export MANPAGER="less -X"
export EDITOR="vim"
export GNUTERM="wxt"
##### Aliases #####
alias ls='ls --color'
alias ll='ls -lha'
alias df='df -H' # df with human readable sizes
alias tree='tree -Csuh' # Nice alternative to 'recursive ls' ...
##### Completions #####
if [ -f /etc/profile.d/bash_completion.sh ]; then
. /etc/profile.d/bash_completion.sh
fi
##### Paths #####
export PATH="/opt/gnuplot/bin:$PATH"
##### Functions #####
function plotex() { # plotex - for creating plots from gnuplot epslatex to pdf
gnuplot $1
for f in $(awk -F\' '/set output/ && /^[^#]/{print $2}' $1); do
local name=$(basename $f .tex)
epstopdf $name-inc.eps
pdflatex -interaction=batchmode $f
rm -f $name{-inc.eps,-inc.pdf,.aux,.log} $f
done
}