-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathempty_dot_zsh_aliases
90 lines (78 loc) · 1.98 KB
/
empty_dot_zsh_aliases
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
#!/bin/sh
if which hub >/dev/null 2>&1; then
alias git='hub'
fi
alias cm="chezmoi"
alias hm="home-manager"
alias nd="nix-darwin"
alias g="git"
alias grep="rg"
alias crontab='echo fuck off'
alias duf="du -sh * | sort -hr"
alias less="less -r"
alias find="fd"
alias c="bat"
alias cat="bat"
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias mkdir="mkdir -p"
alias airport="/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport"
alias afk="open -a /System/Library/CoreServices/ScreenSaverEngine.app"
alias pubkey="more ~/.ssh/id_ed25519.pub | pbcopy | echo '=> Public key copied to pasteboard.'"
alias mv="mv -i"
alias cp="cp -i"
if which exa >/dev/null 2>&1; then
alias ls='exa --icons'
alias l='exa -la --git --icons'
alias la='exa -laa --git --icons'
alias ll='exa -l --git --icons'
else
if [ "$(uname -s)" = "Darwin" ]; then
alias ls="ls -FG"
else
alias ls="ls -F --color"
fi
alias l="ls -lAh"
alias la="ls -A"
alias ll="ls -l"
fi
alias webserver="python -m SimpleHTTPServer 9999"
# quick hack to make watch work with aliases
alias watch='watch '
# open, pbcopy and pbpaste on linux
if [ "$(uname -s)" != "Darwin" ]; then
if [ -z "$(command -v pbcopy)" ]; then
if [ -n "$(command -v xclip)" ]; then
alias pbcopy="xclip -selection clipboard"
alias pbpaste="xclip -selection clipboard -o"
elif [ -n "$(command -v xsel)" ]; then
alias pbcopy="xsel --clipboard --input"
alias pbpaste="xsel --clipboard --output"
fi
fi
if [ -e /usr/bin/xdg-open ]; then
alias open="xdg-open"
fi
fi
hash git &>/dev/null;
if [ $? -eq 0 ]; then
function diff() {
git diff --no-index --color-words "$@";
}
fi;
if [ ! $(uname -s) = 'Darwin' ]; then
if grep -q Microsoft /proc/version; then
# Ubuntu on Windows using the Linux subsystem
alias open='explorer.exe';
else
alias open='xdg-open';
fi
fi
function fuck() {
git oops;
git please;
}
function reload() {
exec "$SHELL" -l
}