-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaliases.zsh
More file actions
67 lines (55 loc) · 1.66 KB
/
Copy pathaliases.zsh
File metadata and controls
67 lines (55 loc) · 1.66 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
# Command Aliases
#
# Generally, any commands that start with `alias` should live here.
# Checks can be done to see if a command exists before building
# the alias.
# Simple aliases
# git aliases
alias g="git"
alias gp="git pull"
alias glog="git log --graph --pretty=\"%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset\""
alias gcl="git clone --recurse-submodules"
alias gss="git status --short -b"
# docker compose aliases
[[ -x "${commands[docker-compose]:A}" ]] && dccmd='docker-compose' || dccmd='docker compose'
alias dce="$dccmd exec"
alias dcps="$dccmd ps"
alias dcstop="$dccmd stop"
alias dcup="$dccmd up"
alias dcdn="$dccmd down"
alias dcl="$dccmd logs"
alias dclf="$dccmd logs -f"
alias dcpull="$dccmd pull"
# fancy cat via bat. remove lines, borders and the pager with -pp
if hash bat 2>/dev/null; then
alias cat="bat -pp"
fi
# Alias ports to lsof for tcp connections
if hash lsof 2>/dev/null; then
alias ports="sudo lsof -iTCP -sTCP:LISTEN -P"
fi
# Alias locate on macOS to Spotlights mdfind -name
if hash mdfind 2>/dev/null; then
alias locate="mdfind -name"
fi
# Make gdb quiet on start
if hash gdb 2>/dev/null; then
alias gdb="gdb -q"
fi
# alias vim to neovim
if hash nvim 2>/dev/null; then
alias vim="nvim"
fi
# Alias proxychains. macOS & brew seems to have it as proxychanins4
# and *everywhere* else its just proxychains
if hash proxychains 2>/dev/null || hash proxychains4 2>/dev/null; then
if hash proxychains 2>/dev/null; then
alias chain="proxychains -q"
else
alias chain="proxychains4 -q"
fi
fi
# eza! https://github.com/eza-community/eza
if hash eza 2>/dev/null; then
alias ls='eza'
fi