-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaliases
36 lines (29 loc) · 898 Bytes
/
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
# Default options for ls.
# ls on OS X does not appear to support the color option.
ls --color=auto > /dev/null 2>&1
LS_EXIT=$?
if [ $LS_EXIT -eq 0 ]; then
alias ls='ls --color=auto'
fi
# Set up space prepended aliases to ignore commands in history
ignore_commands=(exit logout)
for i in "${ignore_commands[@]}"; do
alias $i=' '$i
done
# Common commands.
alias ll='ls -l'
alias la='ls -la'
# Default to MacVim executable.
# if [[ -x /Applications/MacVim.app/Contents/bin/vim ]]
# then
# alias vim='/Applications/MacVim.app/Contents/bin/vim'
# fi
# Use Vim in place of Vi.
alias vi='vim'
# Use vimdiff for SVN diff, without affecting default options.
alias sdiff='svn diff --diff-cmd=diffwrap.sh'
# Copy the previous command to the OS X clipboard.
alias cpc='fc -ln -1 | pbcopy'
# Git
alias gai='git add --interactive'
alias cpb='git symbolic-ref --short HEAD | xargs echo -n | pbcopy'