-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaliases
More file actions
executable file
·115 lines (104 loc) · 3 KB
/
aliases
File metadata and controls
executable file
·115 lines (104 loc) · 3 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# new stuff
[ ! "$(command -v dokku)" ] && alias dokku='$HOME/.dokku/contrib/dokku_client.sh'
alias myip='dig +short myip.opendns.com @resolver1.opendns.com'
alias open='xdg-open'
alias ghs='gh copilot suggest'
alias ghe='gh copilot explain'
alias en='e ~/.config/niri/config.kdl'
alias cc='claude --continue --enable-auto-mode'
alias cld='claude --enable-auto-mode'
alias ccd='claude --continue --enable-auto-mode'
alias dc='docker compose'
#system
alias e='$EDITOR'
alias kf='kill -9 %1'
alias tma='tmux attach'
# edit existing command or create a new script
function ew() {
if [[ -f $(whence -p "$1") ]]; then
e $(whence -p "$1")
else
echo "#!/usr/bin/env " > ~/clearhaus/bin/"$1"
chmod +x ~/clearhaus/bin/"$1"
e ~/clearhaus/bin/"$1"
fi
}
alias pbcopy="wl-copy"
alias pbpaste="wl-paste"
#ruby
alias rv='ruby --version'
alias be='bundle exec'
#ubuntu
if [ "$(command -v apt)" ]; then
alias aptu='sudo apt update && sudo apt upgrade'
alias apti='sudo apt install'
alias aptr='sudo apt remove'
alias aptf='sudo apt-cache search'
fi
#rails
alias rs='rails s'
alias ragm='rails g migration'
alias rc='rails c'
alias migrate='rails db:migrate'
alias upgrade_gems="bundle update && rspec && git add -A && git commit -m 'Gem upgrades' && git push"
alias bef='foreman start -f Procfile.dev'
alias rt='rake -T'
alias rr='rails routes'
#testing
alias specs='rspec --tag ~type:feature'
alias fspecs='rspec --tag type:feature'
alias aspecs='fspecs && specs'
alias fails='rspec --only-failures'
#git
alias g='git'
gsd() { git status -sb && echo "---" && git diff --stat && git diff }
gcam() {
command git add -A;
command git commit -m "$*";
}
gpush() {
command git add -A;
command git commit -m "$*";
command git push
}
alias grestore='git restore . --recurse-submodules'
alias bump-almanac='git submodule update --remote vendor/gems/almanac'
alias trigger-build='git commit --allow-empty -m "Trigger build" && gp'
alias fix-dns='sudo systemctl restart systemd-resolved.service'
alias gpr='g pc && g browse'
bump-sub() { git submodule update --remote "vendor/gems/$1" && gcam "bump $1" && gp }
load-test() { local n=$1; shift; for i in $(seq 1 "$n"); do ap "$@" & done; wait }
alias cp-head='git rev-parse --short HEAD | pbcopy'
alias b='gbr'
alias gb='git branch'
alias gbX='git branch --delete --force'
alias gbx='git branch --delete'
alias gc='git c'
alias gca='git ca'
alias gd='git d'
alias ge='g edit'
alias gg='git grep'
alias gl='git l'
alias gp='git push'
alias gpf='FORCE=1 git push --force-with-lease --no-verify'
alias gs='git status -sb'
alias lz='lazygit'
#msc
alias cd..='cd ..'
if [ "$(command -v eza)" ]; then
alias ls='eza'
alias ll='eza -l'
alias la='eza -a'
fi
alias -g G='|rg'
[ "$(command -v bat)" ] && alias cat='bat'
#system and files editing
alias ea='e ~/dotfiles/aliases'
alias egg='e ~/.config/ghostty/config'
alias eg='e ~/.gitconfig'
alias es='e ~/.ssh/config'
alias et='e ~/dotfiles/tmux.conf'
alias ez='e ~/dotfiles/zsh_mods'
alias ezz='e ~/.zshrc'
alias se='sudo -E nvim'
alias sr='exec zsh'