bashrc now displays git branch nicely
This commit is contained in:
parent
83cfcb5745
commit
8a4c9b5fa4
3 changed files with 14 additions and 7 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
node_modules
|
||||||
|
*.env
|
||||||
11
bashrc.txt
11
bashrc.txt
|
|
@ -37,6 +37,7 @@ colors() {
|
||||||
case ${TERM} in
|
case ${TERM} in
|
||||||
xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*)
|
xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*)
|
||||||
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007" '
|
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007" '
|
||||||
|
|
||||||
;;
|
;;
|
||||||
screen*)
|
screen*)
|
||||||
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\" '
|
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\" '
|
||||||
|
|
@ -70,7 +71,7 @@ if ${use_color} ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${EUID} == 0 ]] ; then
|
if [[ ${EUID} == 0 ]] ; then
|
||||||
PS1='\[\033[01;31m\][\h\[\033[01;36m\] \W\[\033[01;31m\]]\$\[\033[00m\] '
|
PS2='\[\033[01;31m\][\h\[\033[01;36m\] \W\[\033[01;31m\]]\$\[\033[00m\] '
|
||||||
else
|
else
|
||||||
PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] '
|
PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] '
|
||||||
fi
|
fi
|
||||||
|
|
@ -143,6 +144,10 @@ ex ()
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Displays current git branch if there is any
|
||||||
|
|
||||||
|
export PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[01;37m\] $(git branch 2>/dev/null | grep '^*' | colrm 1 2)\n\033[01;32m└─▶ \033[37m'
|
||||||
|
|
||||||
# Custom Bash Commands
|
# Custom Bash Commands
|
||||||
alias .="cd"
|
alias .="cd"
|
||||||
alias docs="cd ~/Documents"
|
alias docs="cd ~/Documents"
|
||||||
|
|
@ -157,8 +162,8 @@ alias js="cd ~/Documents/Code/javascript"
|
||||||
alias ls="ls -lah --color=auto"
|
alias ls="ls -lah --color=auto"
|
||||||
alias {top,htop,btop}="xfce4-terminal --geometry=127x51+0+0 -x btop"
|
alias {top,htop,btop}="xfce4-terminal --geometry=127x51+0+0 -x btop"
|
||||||
alias {firefox,ff}="firefox-developer-edition"
|
alias {firefox,ff}="firefox-developer-edition"
|
||||||
alias {sq,sql,sqlite}="sqlite3"
|
alias {sq,sql,sqlite}="sqlcipher"
|
||||||
alias {nvi,vim,vi}="nvim"
|
alias {nv,nvi,vim,vi}="nvim"
|
||||||
alias {mi,mic,nano}="micro"
|
alias {mi,mic,nano}="micro"
|
||||||
alias {mysql,maria,mdb}="mariadb"
|
alias {mysql,maria,mdb}="mariadb"
|
||||||
alias thinkorswim="~/thinkorswim/thinkorswim"
|
alias thinkorswim="~/thinkorswim/thinkorswim"
|
||||||
|
|
|
||||||
|
|
@ -66,10 +66,10 @@ To display and change wifi settings;
|
||||||
nmcli
|
nmcli
|
||||||
|
|
||||||
To Display Proccesses:
|
To Display Proccesses:
|
||||||
bpytop
|
btop
|
||||||
htop
|
htop
|
||||||
top
|
top
|
||||||
powertop
|
nvtop
|
||||||
|
|
||||||
To Kill all processes on a specific port:
|
To Kill all processes on a specific port:
|
||||||
fuser -k 3000/tcp
|
fuser -k 3000/tcp
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue