-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_bashrc
56 lines (42 loc) · 953 Bytes
/
dot_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
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
then
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
# User specific aliases and functions
PS1="\[\e[0;36m\][\u@\h:\W]\[\e[m\]\\$ "
export HISTSIZE=
export HISTFILESIZE=
export EDITOR=vim
export VISUAL=vim
wgnscmd()
{
namespace="$1ns"
if [ -z "$1" ]; then
printf "%s NAMESPACE CMD\n" "$0"
exit 1
fi
shift
sudo -E ip netns exec "$namespace" sudo -E -u \#$(id -u) -g \#$(id -g) "$@";
}
hg()
{
history |grep "$@" |less -X -F
}
mnt()
{
mount | awk -F' ' '{ printf "%s\t%s\n",$1,$3; }' | column -t | egrep ^/dev/ | sort
}
gip()
{
curl -s http://ip-api.com/json/"$1"?fields=36355 |jq --sort-keys
}
alias cpv="rsync -ah --info=progress2"