-
Notifications
You must be signed in to change notification settings - Fork 0
/
.aliases
46 lines (37 loc) · 791 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
37
38
39
40
41
42
43
44
45
#! /bin/bash
OSNAME=`uname -s`
if hash lsd 2> /dev/null; then
alias ls='lsd'
alias ll='lsd -l'
alias l='lsd -lA'
else
if [ $OSNAME = 'Linux' ]; then
LS_OPTIONS='--color'
elif [ $OSNAME = 'Darwin' ]; then
LS_OPTIONS='-G'
elif [ $(expr substr $OSNAME 1 6) = 'CYGWIN' ]; then
LS_OPTIONS='--color'
else
LS_OPTIONS=''
fi
alias ls='ls $LS_OPTIONS -hF'
alias ll='ls $LS_OPTIONS -lhF'
alias l='ls $LS_OPTIONS -lAhF'
fi
if hash nvim 2> /dev/null; then
alias vi='nvim'
elif hash vim 2> /dev/null; then
alias vi='vim'
fi
alias gk='gitk &'
alias gka='gitk --all &'
alias grep='grep --color=auto'
if [ $OSNAME = 'Linux' ]; then
alias diff='diff --color=auto'
elif [ $OSNAME = 'Darwin' ]; then
if hash colordiff 2> /dev/null; then
alias diff='colordiff'
else
:
fi
fi