-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbash_aliases
More file actions
37 lines (29 loc) · 837 Bytes
/
bash_aliases
File metadata and controls
37 lines (29 loc) · 837 Bytes
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
####
# Regular
alias ll="ls -l"
alias la="ls -la"
alias grep=" grep --color=auto"
####
# More specific
# Compress PDFs
function compresspdf { gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile="${1%.pdf}_compressed.pdf" "$1"; }
# Import a template
function template { cp -i "$MYSETUP_PATH/templates/$1" .; }
export -f template
# Jump to the most used directory
# In the sense on the one which is set with setwd
function jmpwd {
if ! [ -f "$MYSETUP_PATH/.current_working_dir" ]
then
touch "$MYSETUP_PATH/.current_working_dir"
fi
cd `cat "$MYSETUP_PATH/.current_working_dir"`;
}
export -f jmpwd
function setwd {
echo $PWD/$1 > $MYSETUP_PATH/.current_working_dir;
}
export -f setwd
# Create a directory and jump to it
function mkcd { mkdir $1 && cd $1; }
export -f mkcd