Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

app to see git branches in ubuntu

parse_git_branch() {
 git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* (.*)/(1)/'
}
if [ "$color_prompt" = yes ]; then
 PS1='${debian_chroot:+($debian_chroot)}[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[01;31m] $(parse_git_branch)[33[00m]$ '
else
 PS1='${debian_chroot:+($debian_chroot)}u@h:w$(parse_git_branch)$ '
fi
# THE SIX LINES BELOW are the default prompt and the unset (which were in the original .bashrc)
#if [ "$color_prompt" = yes ]; then
#    PS1='${debian_chroot:+($debian_chroot)}[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[00m]$ '
#else
#    PS1='${debian_chroot:+($debian_chroot)}u@h:w$ '
#fi
#unset color_prompt force_color_prompt
Comment

PREVIOUS NEXT
Code Example
Shell :: batch start file with default program but wait 
Shell :: bash nb args 
Shell :: wireshark.msi install powershell 
Shell :: Use dropbox as private git repository 
Shell :: multipass no space left on device 
Shell :: remove deb repository 
Shell :: create new workflow branch 
Shell :: show all vscode extensions installed in commandline 
Shell :: Git add only new files,not modefied files 
Shell :: print star 
Shell :: how to launch synaptic package manager from terminal in ubuntu 
Shell :: Oops… I committed all those changes to the master branch 
Shell :: how to install apt on chromebook 
Shell :: grep show line 
Shell :: no of lines 
Shell :: set default permission to user for git use 
Shell :: docker run -e 
Shell :: start commit with pound sign 
Shell :: grep stack overflow 
Shell :: powershell return tuple 
Shell :: execute result of query bash 
Shell :: how to apply a diff file to my branch 
Shell :: filmora remove watermark free 
Shell :: Err:6 https://apt.kubernetes.io kubernetes-xenial Release 
Shell :: Edit remote files with Vim on Linux 
Shell :: task scheduler powershell closes immediately 
Shell :: bash loop local variable 
Shell :: how to make a text in batch 
Shell :: powershell change windows policy 
Shell :: android studio add flutter plugin 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =