-
Notifications
You must be signed in to change notification settings - Fork 1
/
.bashrc
129 lines (118 loc) · 4.44 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# /etc/bashrc
# System wide functions and aliases
# Environment stuff goes in /etc/profile
# It's NOT a good idea to change this file unless you know what you
# are doing. It's much better to create a custom.sh shell script in
# /etc/profile.d/ to make custom changes to your environment, as this
# will prevent the need for merging in future updates.
# are we an interactive shell?
if [ "$PS1" ]; then
if [ -z "$PROMPT_COMMAND" ]; then
case $TERM in
xterm*|vte*)
if [ -e /etc/sysconfig/bash-prompt-xterm ]; then
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm
elif [ "${VTE_VERSION:-0}" -ge 3405 ]; then
PROMPT_COMMAND="__vte_prompt_command"
else
PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
fi
;;
screen*)
if [ -e /etc/sysconfig/bash-prompt-screen ]; then
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-screen
else
PROMPT_COMMAND='printf "\033k%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
fi
;;
*)
[ -e /etc/sysconfig/bash-prompt-default ] && PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default
;;
esac
fi
# Turn on parallel history
shopt -s histappend
history -a
# Turn on checkwinsize
shopt -s checkwinsize
[ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
# You might want to have e.g. tty in prompt (e.g. more virtual machines)
# and console windows
# If you want to do so, just add e.g.
# if [ "$PS1" ]; then
# PS1="[\u@\h:\l \W]\\$ "
# fi
# to your custom modification shell script in /etc/profile.d/ directory
fi
if ! shopt -q login_shell ; then # We're not a login shell
# Need to redefine pathmunge, it get's undefined at the end of /etc/profile
pathmunge () {
case ":${PATH}:" in
*:"$1":*)
;;
*)
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
esac
}
# By default, we want umask to get set. This sets it for non-login shell.
# Current threshold for system reserved uid/gids is 200
# You could check uidgid reservation validity in
# /usr/share/doc/setup-*/uidgid file
if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then
umask 002
else
umask 022
fi
SHELL=/bin/bash
# Only display echos from profile.d scripts if we are no login shell
# and interactive - otherwise just process them to set envvars
for i in /etc/profile.d/*.sh; do
if [ -r "$i" ]; then
if [ "$PS1" ]; then
. "$i"
else
. "$i" >/dev/null
fi
fi
done
unset i
unset -f pathmunge
fi
# Remaps caps lock to ctrl
xmodmap ~/.speedswapper
# vim:ts=4:sw=4
unset SSH_ASKPASS
eval `ssh-agent -s`
ssh-add
alias install="sudo apt-get install"
alias search="sudo apt-cache search"
alias a="cd /home/gregmccoy/Programming"
alias c="cd /home/gregmccoy/Programming/gfa/gfa-apps"
alias d="cd /home/gregmccoy/Programming/gfa/templates/templates/templates"
alias kb="kubectl"
alias emails="cd /home/gregmccoy/Programming/emails/src/ca"
alias xclip="xclip -selection c"
#alias runemails="python ca.py -f new.html && cat default.html | xclip && echo 'Copied to Clipboard'"
#sh /home/gregmccoy/.scripts/init.sh
alias push="git push origin staging"
alias pull="git checkout master && git pull origin master && git checkout staging && git pull origin staging && git merge master"
alias next="playerctl next"
alias prev="playerctl previous"
alias pause="playerctl play-pause"
alias gitlines="git ls-files | xargs wc -l"
alias gep=grep
alias storage2="smbclient -U canada.gfa.org/gregmccoy //storage2/data/ -m SMB3"
alias shares="sudo mount -t cifs -o username=gregmccoy,domain=canada.gfa.org,vers=3.0 //storage2/data/ /mnt"
alias nas="sudo mount -t cifs -o username=gregmccoy,domain=canada.gfa.org,vers=2.0 //nas1/data/ /mnt"
export PS1="\[\033[38;5;2m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\]:\[$(tput sgr0)\]\[\033[38;5;21m\]\W\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]"
#export KUBECONFIG=/home/gregmccoy/.kube/kubeconfig
# Carina
#source /home/gregmccoy/.dvm/dvm.sh
# The next line updates PATH for the Google Cloud SDK.
source '/home/gregmccoy/Programming/google-cloud-sdk/path.bash.inc'
# The next line enables shell command completion for gcloud.
source '/home/gregmccoy/Programming/google-cloud-sdk/completion.bash.inc'