-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.aliases
More file actions
48 lines (39 loc) · 1.19 KB
/
.aliases
File metadata and controls
48 lines (39 loc) · 1.19 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
#!/bin/sh
alias rm="nocorrect rm --preserve-root -I"
# git
alias gs='git s'
## ls
alias l='eza -F -alT -L 1 -I ".git" --group-directories-first'
alias ll='eza -F -alT -L 2 -I ".git|node_modules|vendor" --group-directories-first'
alias lll='eza -F -alT -L 3 -I ".git|node_modules|vendor" --group-directories-first'
alias la='eza -aa -s extension -s name'
## Command line head / tail shortcuts
alias -g H='| head'
alias -g T='| tail'
alias -g G='| grep'
alias -g L="| less"
alias -g NUL="> /dev/null 2>&1"
alias lf='less +F'
alias -g LF="| lf"
alias -g -- --help='--help 2>&1 | bat --language=help --style=plain'
## Docker (and related)
alias dockps='docker ps --format="{{.Names}}[{{.Ports}}]: {{.Command}} ({{.Status}})"'
alias dockc='docker-compose'
alias k=kubectl
## other
alias cat='bat'
alias emacskill='emacsclient -e "(kill-emacs)"'
alias historysummary="history | awk '{a[\$2]++} END{for(i in a){printf \"%5d\t%s\n\",a[i],i}}' | sort -rn | head"
alias c="code ."
alias pip="python3 -m pip"
if [ -f /etc/wsl.conf ]; then
# WSL environment
alias open="wslview"
fi
if type podman >/dev/null 2>&1 ; then
alias docker=podman
fi
# Replace cd with zoxide
if type z > /dev/null 2>&1 ; then
alias cd=z
fi