-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bash_aliases
98 lines (76 loc) · 2.16 KB
/
.bash_aliases
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
#! /bin/bash
# dirs
alias dirs='dirs -v'
alias d='dirs'
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias lh='ls -ad .*'
# grep
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# prefer exa over ls when present
if [ -x "$(command -v exa)" ]; then
alias ls=exa
fi
# less
#alias less='less -N'
# screen/tmux
alias sls='screen -ls'
alias tls='tmux ls'
# disk usage
alias du='du -h'
alias dud='du -had1'
alias df='df -h'
# pushd and popd
alias +='pushd'
alias _='popd'
# cd
alias ..="cd ../"
alias ...="cd ../.."
alias ....="cd ../../../"
alias .....="cd ../../../.."
alias ......="cd ../../../../.."
# tree
alias tre='tree --prune -lP'
# 'cat' with syntax highlighting.
# to colorize other output, use grcat. Ex: grcat ping some.random.address
alias ccat='pygmentize -g'
#alias ccat='highlight -O ansi'
# search open ssh hosts on network
# example use: mapssh 10.0.0.0/24
alias mapssh='nmap -p22 --open -PN -sV -oG ssh_hosts'
# ssh aliases
alias ssh='TERM=xterm ssh'
alias ssh-keyprint='ssh-keygen -E md5 -lf'
# dtach dvtm sessions
#alias irssisession='dtach -c /tmp/irssi-session -r winch dvtm'
#alias defaultsession='dtach -c /tmp/default-session -r winch dvtm'
# docker aliases
alias dps='docker ps -a'
alias dim='docker images'
# get current public ip
alias myip="curl icanhazip.com"
# print all pdfs in folder
alias printallpdf="for f in *.pdf; do lpr $f; done"
# git aliases
alias git-prune-br="git branch --merged | egrep -v \"(^\*|master|dev)\" | xargs git branch -d"
alias gst="git st"
alias gls="git ls"
alias gls10="gls -10"
alias gls20="gls -20"
alias gd="git d"
# thefuck alias
eval $(thefuck --alias)
# screenshot alias
alias sshot="maim -s ~/Pictures/$(date "+%Y%m%d-%H%M%S").jpg"
# nwn alias
alias nwn-build="docker run --rm -it --user $UID:$UID -v \"$(pwd):/home/devbase/build\" jakkn/nwn-devbase"