-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.aliases
More file actions
90 lines (77 loc) · 2.16 KB
/
.aliases
File metadata and controls
90 lines (77 loc) · 2.16 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# ============================================================================
# Useful Aliases
# ============================================================================
# Navigation
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias ls='ls --color=auto'
alias ll='ls -lah'
alias la='ls -A'
# Git aliases
alias gs='git status'
alias ga='git add'
alias gc='git commit'
alias gp='git push'
alias gl='git pull'
alias gd='git diff'
alias gco='git checkout'
alias gb='git branch'
alias glog='git log --oneline --graph --decorate'
# Tmux
alias ta='tmux attach -t'
alias tad='tmux attach -d -t'
alias ts='tmux new-session -s'
alias tl='tmux list-sessions'
alias tk='tmux kill-session -t'
# Neovim
alias vi='nvim'
alias vim='nvim'
# Safety
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# Other useful commands
alias grep='grep --color=auto'
alias df='df -h'
alias du='du -h'
# Cat with syntax highlighting (if bat is available)
if command -v bat &> /dev/null; then
alias cat='bat --style=plain'
fi
# ============================================================================
# Development Aliases
# ============================================================================
# Python development
if command -v python3 &> /dev/null; then
alias py='python3'
alias pip='python3 -m pip'
alias venv='python3 -m venv'
alias activate='source venv/bin/activate'
alias pytest='python3 -m pytest'
alias ptw='python3 -m pytest --watch' # If pytest-watch is installed
fi
# Go development
if command -v go &> /dev/null; then
alias got='go test ./...'
alias gotv='go test -v ./...'
alias gob='go build'
alias gor='go run'
alias gom='go mod tidy'
alias gotest='go test -cover ./...'
alias gobench='go test -bench=. -benchmem'
fi
# Kubernetes (minimal - for when you need it)
if command -v kubectl &> /dev/null; then
alias k='kubectl'
alias kgp='kubectl get pods'
alias kl='kubectl logs'
alias klf='kubectl logs -f'
alias kctx='kubectl config current-context'
fi
# Docker (minimal - for local dev)
if command -v docker &> /dev/null; then
alias d='docker'
alias dps='docker ps'
alias dl='docker logs -f'
fi