-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzaliases
70 lines (44 loc) · 1.35 KB
/
zaliases
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
# aliases (sourced from .zshrc)
## don't glob
alias find='noglob find'
alias ftp='noglob ftp'
alias rsync='noglob rsync'
alias scp='noglob scp'
alias sftp='noglob sftp'
## don't correct
#alias grep='nocorrect grep'
## don't clobber
alias cp="${aliases[cp]:-cp} -i"
alias mv="${aliases[mv]:-mv} -i"
alias rm="${aliases[rm]:-rm} -i"
## ls
if is-callable 'dircolors'; then
# GNU Core Utilities
alias ls="${aliases[ls]:-ls} --group-directories-first"
alias ls="${aliases[ls]:-ls} --color=auto"
else
# BSD Core Utilities
alias ls="${aliases[ls]:-ls} -G"
fi
alias la="${aliases[ls]:-ls} -lA"
alias ll="${aliases[ls]:-ls} -lh"
alias sl='ls'
# programs
## tmux
alias tmux="${aliases[tmux]:-tmux} -2"
alias t="${aliases[tmux]:-tmux} attach"
alias ta="${aliases[tmux]:-tmux} attach-session -t"
alias ts="${aliases[tmux]:-tmux} list-sessions"
alias tn="${aliases[tmux]:-tmux} new-session -s"
## emacs (also used in my VISUAL & EDITOR variables)
### start in a new terminal frame
myemacsc=('emacsclient' '-c' '-t' '--alternate-editor' '""')
alias em="${myemacsc}"
### start a windowed frame
alias ec='emacsclient --alternate-editor "" -n -c'
### do not start a new frame
alias eopen='emacsclient --alternate-editor "" -n'
## miscellaneous utilities
alias agn="ag --no-numbers"
### serve directory via HTTP
alias http-serve='python -m SimpleHTTPServer'