-
Notifications
You must be signed in to change notification settings - Fork 1
/
alias
69 lines (57 loc) · 2.37 KB
/
alias
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
export LC_ALL=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export EDITOR=vim
export MANPAGER="sh -c \"col -b | vim -c 'set ft=man ts=8 nomod nolist nonu colorcolumn=0' \
-c 'nnoremap i <nop>' \
-c 'nnoremap a <nop>' \
-c 'nnoremap <Space> <C-f>' \
-c 'noremap q :quit<CR>' -\""
export DEV="$HOME/Developer"
export LLVM="$DEV/open-source/llvm.org"
export TERM=xterm-256color
export DISPLAY=:0
export PATH=/usr/local/bin:$PATH
export PATH=/usr/local/sbin:$PATH
export PATH="/opt/homebrew/bin:$PATH"
export PATH=$HOME/.cargo/bin:$PATH
export HOMEBREW_NO_ANALYTICS=1
export SCCACHE_CACHE_SIZE="100G"
# Rust binary utilities replacement
[ -x "$(command -v bat)" ] && alias cat="bat"
[ -x "$(command -v exa)" ] && alias ls="exa"
[ -x "$(command -v exa)" ] && alias tree="exa -T"
[ -x "$(command -v delta)" ] && alias diff="delta"
[ -x "$(command -v dust)" ] && alias du="dust"
[ -x "$(command -v mcfly)" ] && eval "$(mcfly init zsh)"
[ -x "$(command -v btm)" ] && alias top="btm -c"
[ -x "$(command -v gping)" ] && alias ping="gping"
[ -x "$(command -v zoxide)" ] && eval "$(zoxide init --cmd cd zsh)"
move_to_trash () {
if [ ! -d ~/.Trash ]; then
mkdir -p ~/.Trash
fi
for arg do
shift
[ "$arg" = "-rf" ] && continue
[ "$arg" = "-r" ] && continue
[ "$arg" = "-f" ] && continue
set -- "$@" "$arg"
done
mv "$@" ~/.Trash
}
[ ! -x "$(command -v exa)" ] && alias ls="ls --color"
alias rm="move_to_trash"
alias dev='cd $DEV'
alias llvm='cd $LLVM'
alias ga='git add '
alias gs='git status'
alias gc='git commit -s'
alias gp='git push '
alias gd='git diff'
alias gl='git log --graph --abbrev-commit --decorate --date=relative --all '
alias go='git log --oneline --decorate --all '
alias glo='git log --oneline --decorate '
alias gop='git log --oneline --decorate --all --pretty="%C(yellow)%h %Cred%d %Creset%s %Cgreen%<(7)%aN%Creset"'
alias codenames="$(base64 -d <<< eGNydW4gLXNkayBpcGhvbmVvcy5pbnRlcm5hbCBlbWJlZGRlZF9kZXZpY2VfbWFwIC1xdWVyeSAic2VsZWN0IGRpc3RpbmN0IFRhcmdldFR5cGUsIFByb2R1Y3RUeXBlLCBQbGF0Zm9ybU5hbWUsIEtlcm5lbE1hY2hvQXJjaGl0ZWN0dXJlLCBQcm9kdWN0RGVzY3JpcHRpb24gZnJvbSBUYXJnZXRzIG9yZGVyIGJ5IFByb2R1Y3RUeXBlIgo=)"