-
Notifications
You must be signed in to change notification settings - Fork 246
Expand file tree
/
Copy path.alias
More file actions
71 lines (53 loc) · 1.9 KB
/
.alias
File metadata and controls
71 lines (53 loc) · 1.9 KB
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
# Shortcuts
alias reload="source ~/.bash_profile"
alias _="sudo"
alias g="git"
alias rr="rm -rf"
alias mux="tmuxinator"
# Default options
alias rsync="rsync -vh"
alias json="json -c"
alias psgrep="psgrep -i"
# Global aliases
if $(is-supported "alias -g"); then
alias -g G="| grep -i"
alias -g H="| head"
alias -g T="| tail"
alias -g L="| less"
fi
# List declared aliases, functions, paths
alias aliases="alias | sed 's/=.*//'"
alias functions="declare -f | grep '^[a-z].* ()' | sed 's/{$//'"
alias paths='echo -e ${PATH//:/\\n}'
# Directory listing/traversal
LS_COLORIZED=$(is-supported "ls --color" --color -G)
LS_TIMESTYLEISO=$(is-supported "ls --time-style=long-iso" --time-style=long-iso)
LS_GROUPDIRSFIRST=$(is-supported "ls --group-directories-first" --group-directories-first)
alias l="ls -lahA $LS_COLORIZED $LS_TIMESTYLEISO $LS_GROUPDIRSFIRST"
alias ll="ls -lA $LS_COLORIZED"
alias lt="ls -lhAtr $LS_COLORIZED $LS_TIMESTYLEISO $LS_GROUPDIRSFIRST"
alias ld="ls -ld $LS_COLORIZED */"
alias lp="stat -c '%a %n' *"
unset LS_COLORIZED LS_TIMESTYLEISO LS_GROUPDIRSFIRST
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias -- -="cd -" # Go to previous dir with -
alias cd.='cd $(readlink -f .)' # Go to real dir (i.e. if current dir is linked)
# p/npm
alias b="bun"
alias p="pnpm"
alias ncu="npm-check-updates --interactive"
alias ncuw="npm-check-updates --interactive --root --workspaces"
# Network
alias ipp="dig +short myip.opendns.com @resolver1.opendns.com"
alias ipl="ip route get 1.1.1.1 2>/dev/null | awk 'NR==1{print \$7}'"
# Miscellaneous
alias hosts="sudo $EDITOR /etc/hosts"
alias quit="exit"
alias week="date +%V"
alias speedtest="wget -O /dev/null http://speed.transip.nl/100mb.bin"
alias grip="grip --browser --pass=$GITHUB_TOKEN"
alias fkill="ps -e | fzf | awk '{print $1}' | xargs kill"
alias formatmd="remark --use remark-preset-webpro"