-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbash_profile
More file actions
62 lines (55 loc) · 2.07 KB
/
bash_profile
File metadata and controls
62 lines (55 loc) · 2.07 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#customisations
alias ll='ls -FGlAhp' # Preferred 'ls' implementation
alias less='less -FSRXc' # Preferred 'less' implementation
cd() { builtin cd "$@"; ll; } # Always list directory contents upon 'cd'
alias cd..='cd ../' # Go back 1 directory level (for fast typers)
alias ..='cd ../' # Go back 1 directory level
alias ...='cd ../../' # Go back 2 directory levels
alias .3='cd ../../../' # Go back 3 directory levels
alias .4='cd ../../../../' # Go back 4 directory levels
alias .5='cd ../../../../../' # Go back 5 directory levels
alias .6='cd ../../../../../../' # Go back 6 directory levels
alias edit='subl' # edit: Opens any file in sublime editor
alias gh='history|grep' # eg: gh bash
# git aliases
alias gs='git status'
alias gp='git pull'
alias gb='git branch'
alias ga='git add'
alias gd='git diff'
alias gl='git pull'
alias gf='git fetch'
alias gps='git push'
alias gc='git commit -m $1'
# clear screen
alias c,='clear'
# rails alises
alias rs='rails s'
alias rc='rails c'
alias rg='rails g'
alias rr='rails routes'
alias rdbm='rails db:migrate'
# alias to projects
alias exrb='cd ~/snap/exercism/5/exercism/ruby/'
function prompt {
local BLACK="\[\033[0;30m\]"
local BLACKBOLD="\[\033[1;30m\]"
local RED="\[\033[0;31m\]"
local REDBOLD="\[\033[1;31m\]"
local GREEN="\[\033[0;32m\]"
local GREENBOLD="\[\033[1;32m\]"
local YELLOW="\[\033[0;33m\]"
local YELLOWBOLD="\[\033[1;33m\]"
local BLUE="\[\033[0;34m\]"
local BLUEBOLD="\[\033[1;34m\]"
local PURPLE="\[\033[0;35m\]"
local PURPLEBOLD="\[\033[1;35m\]"
local CYAN="\[\033[0;36m\]"
local CYANBOLD="\[\033[1;36m\]"
local WHITE="\[\033[0;37m\]"
local WHITEBOLD="\[\033[1;37m\]"
local RESETCOLOR="\[\e[00m\]"
export PS1="\n$PURPLEBOLD\u $CYAN@ $CYANBOLD\w $GREEN\T $RESETCOLOR$GREENBOLD\n\$(git branch 2> /dev/null)\n $PURPLE[\#] $ $RESETCOLOR"
export PS2=" | $ $RESETCOLOR"
}
prompt