-
Notifications
You must be signed in to change notification settings - Fork 0
/
bash_aliases
48 lines (42 loc) · 1.15 KB
/
bash_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
# bash_aliases: user-defined aliases and functions for bash
# Color support for ls and grep
alias ls='ls -G'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
# Listing directories
alias l.='ls -ld .*'
alias ll='ls -l'
alias la='ls -lA'
alias lh='ls -Aoh'
alias lt='ls -lAtr'
# Start Chromium
if [ -x /usr/bin/google-chrome ]; then
alias chrome='google-chrome > /dev/null 2>&1 &'
alias incognito='google-chrome --incognito > /dev/null 2>&1 &'
elif [ -x /usr/bin/chromium ]; then
alias chrome='chromium > /dev/null 2>&1 &'
alias incognito='chromium --incognito > /dev/null 2>&1 &'
fi
# TeX options
if [ -x /usr/bin/pdflatex ] || [ -x /usr/texbin/pdflatex ]; then
# Only consider .tex files with pdflatex
complete -f -o dirnames -X "!*.tex" pdflatex
fi
# Read PDF files only
if [ -x /usr/bin/evince ]; then
view() {
if [ $# -gt 0 ]; then
evince $@ > /dev/null 2>&1 &
fi
}
complete -f -o dirnames -X "!*.pdf" view
else
view() {
if [ $# -gt 0 ]; then
open $@
fi
}
complete -f -o dirnames -X "!*.pdf" view
fi
#" vim: filetype=sh