-
Notifications
You must be signed in to change notification settings - Fork 1
/
.bashrc_
30 lines (27 loc) · 826 Bytes
/
.bashrc_
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
# git prompt
if [ "$color_prompt" = yes ]; then
source /usr/lib/git-core/git-sh-prompt
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$(__git_ps1 " (%s) ")\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
GIT_PS1_SHOWDIRTYSTATE=1
GIT_PS1_SHOWSTASHSTATE=1
GIT_PS1_SHOWUNTRACKEDFILES=1
GIT_PS1_SHOWUPSTREAM="verbose git"
# extract pdf pages
function pdf-extract()
{
EXPECTED_ARGS=3
if [ $# -ne $EXPECTED_ARGS ]
then
echo "pdf-extract {input pdf file} {first page} {last page}"
else
gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER \
-dFirstPage=${2} \
-dLastPage=${3} \
-sOutputFile="${1%.pdf}_page_${2}-${3}.pdf" \
"${1}"
fi
}