-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbash_profile.symlink
42 lines (37 loc) · 1.04 KB
/
bash_profile.symlink
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
# Set OSX ls colors
export CLICOLOR=1
export LSCOLORS="GxFxCxDxBxegedabagaced"
# my alias
alias ls='ls -hp'
alias l='ls -l'
alias la='ls -Al'
alias ll='ls -Al'
alias ..='cd ../'
alias c='clear'
alias p='pwd'
alias myip='curl https://ip.appspot.com && echo ""'
# Universal extrator from https://natelandau.com/my-mac-osx-bash_profile/
# export in sh file?
# extraxt to folder
extract () {
if [ -f $1 ] ; then
outdir=${1%%.*}
echo "Extracting to: $outdir"
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar e $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x -o${1%%.*} $1 ;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}