-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbash_alias.txt
63 lines (44 loc) · 2.28 KB
/
bash_alias.txt
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
# -----------------------------
# 0. TO SOURCE .BASH_ALIASES
# -----------------------------
# The following must be present and uncommented in primary .bashrc
# (or equivalent file)
# if [ -f ~/.bash_aliases ]; then
# . ~/.bash_aliases
# fi
# -----------------------------
# 1. TERMINAL COMMANDS MORE USEFUL
# -----------------------------
alias cp='cp -iv' # Preferred 'cp' implementation
alias mv='mv -iv' # Preferred 'mv' implementation
alias rm='rm -iv' # Preferred 'rm' implementation
alias mkdir='mkdir -pv' # Preferred 'mkdir' implementation
alias l='ls -FGlAhptr --color=auto' # Preferred 'ls' implementation
alias sbash='source ~/.bashrc' # shortcut to update bash
# speedier GitHub refresh
alias gitpull='cd ~/how-to; git pull --all; cd ~/monteCarlo; git pull --all; cd ~/packages; git pull --all; cd ~/pbt-code; git pull --all'
alias gitpush='cd ~/how-to; git push --all; cd ~/monteCarlo; git push --all; cd ~/packages; git push --all; cd ~/pbt-code; git push --all'
# -----------------------------
# 2. PRETTIER PROMPT
# -----------------------------
# default prompt
# \[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;34m\]\w \$\[\033[00m\] '
export DEFAULT=$PS1
# https://www.howtogeek.com/307701/how-to-customize-and-colorize-your-bash-prompt/
# \u - username
# \w - path
export PS1='\[\033[01;32m\]\u \[\033[00m\]: \[\033[01;34m\]\w \[\033[00m\]\n> '
# https://gist.github.com/justintv/168835
# adding git branch to prompt
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\] \[\033[33;1m\]\w\[\033[m\] (\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)) \$ "
### combining
export PS1="\[\033[01;32m\]\u \[\033[00m\]@ \[\033[01;94m\]\w \[\033[01;93m\]{\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)} \[\033[00m\]\n> "
# -----------------------------
# 3. PATHS AND LINKS
# -----------------------------
export ROOTSYS=/usr/local/root/root_v6.12.06
export PATH=$PATH:$ROOTSYS/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib
source /usr/local/geant4/geant4.10.03.p03-install/bin/geant4.sh
source /usr/local/root/root-6.14.04-build/bin/thisroot.sh
export PATH=$PATH:/usr/local/gate/gate_v8.0-build/