-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.bash_aliases
More file actions
68 lines (61 loc) · 2 KB
/
.bash_aliases
File metadata and controls
68 lines (61 loc) · 2 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
shopt -s expand_aliases
alias ls='ls --color=auto'
alias grep='grep --color=auto --exclude-dir=.git --exclude=*.sw? --exclude=*.pyc'
alias fgrep='fgrep --color=auto --exclude-dir=.git --exclude=*.sw? --exclude=*.pyc'
alias egrep='egrep --color=auto --exclude-dir=.git --exclude=*.sw? --exclude=*.pyc'
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias dua='sudo du -sch .[!.]* * | sort -h'
alias decolorize='sed "s/\x1B\[[0-9;]*[JKmsu]//g"'
alias gf='git fetchp'
alias gp='git pullp'
alias vimclean='find -iname "*.sw?" -delete'
alias cb='cargo build --color always 2>&1 | less -RC'
alias cl='cargo clippy --color always 2>&1 | less -RC'
alias cr='cargo run --color always 2>&1 | less -RC'
alias ct='cargo test --color always -- --show-output 2>&1 | less -RC'
alias cg='cargo playground --color always 2>&1 | less -RC'
alias cs='cargo sweep --time 1'
alias cs0='cargo sweep --time 0'
alias ce='cargo expand --lib'
alias ccc='cargo cache clean-unref && cargo cache clean-unref --dry-run && cargo cache clean-unref --dry-run'
alias scs='sccache --show-stats'
alias j='just'
alias evcxr='evcxr --edit-mode vi'
alias codex_upgrade='npm install --upgrade -g --prefix ~/.local @openai/codex'
alias dockviz="docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock nate/dockviz"
gw() {
if [ "$#" -eq 0 ]; then
git worktree list
else
git worktree "$@"
fi
}
gg() {
local git_base gg_file line word
local -a branches words
git_base=$(git rev-parse --show-toplevel 2>/dev/null) || {
git graph "$@"
return
}
gg_file="$git_base/.gg"
if [ ! -f "$gg_file" ]; then
git graph "$@"
return
fi
while IFS= read -r line; do
line="${line%%#*}"
[ -n "$line" ] || continue
read -r -a words <<< "$line"
for word in "${words[@]}"; do
git rev-parse --verify --quiet "${word}^{commit}" >/dev/null || continue
branches+=("$word")
done
done < "$gg_file"
if [ "${#branches[@]}" -eq 0 ]; then
git graph "$@"
return
fi
git mlog --graph "${branches[@]}" "$@"
}