-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaliasrc
101 lines (91 loc) · 2.92 KB
/
aliasrc
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
#
# # ex - archive extractor
# # usage: ex <file>
ex ()
{
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.tar.xz) tar xJf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via ex()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
export EDITOR=vim
alias pacman-update='sudo pacman-mirrors --geoip'
# ls, the common ones I use a lot shortened for rapid fire usage
alias ls-'ls --color'
alias l='ls -lFh --color' #size,show type,human readable
alias la='ls -lAFh --color' #long list,show almost all,show type,human readable
alias lr='ls -tRFh --color' #sorted by date,recursive,show type,human readable
alias lt='ls -ltFh --color' #long list,sorted by date,show type,human readable
alias ll='ls -alh --color' #long list
alias ldot='ls -ld --color .*'
alias lS='ls -1FSsh --color'
alias lart='ls -1Fcart --color'
alias lrt='ls -1Fcrt --color'
alias zshrc='${=EDITOR} ~/.zshrc' # Quick access to the ~/.zshrc file
alias grep='grep --color'
alias sgrep='grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS} '
alias t='tail -f'
# Command line head / tail shortcuts
alias -g H='| head'
alias -g T='| tail'
alias -g G='| grep'
alias -g L="| less"
alias -g M="| most"
alias -g LL="2>&1 | less"
alias -g CA="2>&1 | cat -A"
alias -g NE="2> /dev/null"
alias -g NUL="> /dev/null 2>&1"
alias -g P="2>&1| pygmentize -l pytb"
alias dud='du -d 1 -h'
alias duf='du -sh *'
alias fd='find . -type d -name'
alias ff='find . -type f -name'
alias h='history'
alias hgrep="fc -El 0 | grep"
alias help='man'
alias p='ps -f'
alias sortnr='sort -n -r'
alias unexport='unset'
alias rm='rm -i'
alias cp='cp -i'
alias cpr='cp -r'
alias mv='mv -i'
alias vim='vim'
alias vi='vim'
# GIT aliases
gitpush() {
git add .
git commit -m "$*"
git push
}
alias gp=gitpush
# Build Aliases
alias cnr='cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=Release -G Ninja .. && ninja'
alias cn='cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=Debug -G Ninja .. && ninja'
alias cm='cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=Debug .. && make -j${nproc}'
alias cmr='cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=Release .. && make -j${nproc}'
alias m='make -j6'
alias n='ninja'
alias resize='gsettings set org.gnome.desktop.interface text-scaling-factor'
alias clean='rm -rf ../build/*'
alias login_nano='ssh -X [email protected]'
alias login_xav='ssh -X [email protected]'
alias copy_ws='scp -r /media/ar/Samsung_T5/microatr [email protected]:/home/user1/.'
# GPU aliases
alias smi='nvidia-smi'
alias gpu_usage='sudo fuser -v /dev/nvidia*'