-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.aliases
More file actions
57 lines (51 loc) · 1.93 KB
/
.aliases
File metadata and controls
57 lines (51 loc) · 1.93 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
# shellcheck disable=SC2148
# shellcheck disable=SC2139
# ALIASES
if (command -v eza >/dev/null 2>&1); then
# To use these aliases, install eza
# one-line list
alias ls='eza -a --color=always --icons'
# multi-line list with header, colors, octal permissions
alias ll='eza -lag --header --icons --octal-permissions --color=always'
# multi-line list with icons
alias l='eza -lag --icons --color=always'
# multi-line list without icons (same as classic ls -lah)
alias la='eza -lag --color=always'
# multi-line list with file names only
alias lS='eza -a -1 --color=always --icons'
# multi-line tree with file names only
alias lt='eza -a --tree --level=2 --color=always --icons'
elif (! command -v eza >/dev/null 2>&1); then
# aliases if using /bin/ls + tree
# Basic list with all files and colors
alias ls='ls -a --color=always'
# Long format with all files, human-readable sizes, and colors
alias ll='ls -lah --color=always'
# Same as ll (long format with all files)
alias l='ls -lah --color=always'
# Same as above (this was already equivalent to ls -lah)
alias la='ls -lah --color=always'
# Single column format with all files
alias lS='ls -a -1 --color=always'
# Tree view - requires the 'tree' command (not part of ls)
alias lt='tree -a -L 2'
fi
# open current dir in Finder
alias here='open .'
# list all TCP ports
alias ports='lsof -iTCP -sTCP:LISTEN -n -P'
# stop all containers
alias docker-stop-containers='docker stop $(docker ps -aq)'
# remove all containers
alias docker-rm-containers='docker rm $(docker ps -aq)'
# Print each PATH entry on a separate line
alias path='echo -e ${PATH//:/\\n}'
# Reload the shell (i.e. invoke as a login shell)
alias reload="exec ${SHELL} -l"
# Easier navigation: .., ..., ...., ....., ~ and -
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
# Kubernetes
alias k="kubectl"