Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

color git

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 :: Error: Account is not an upgradeable program or already in use 
Shell :: check for webhint version 
Shell :: directory listing 
Shell :: apt asks for geographic location while installing docker image 
Shell :: install amazon-linux-extras 
Shell :: drupal 9 dump database 
Shell :: linux check how many open files are allowed 
Shell :: how to install cv2 using pip 
Shell :: upgrade R kernel 
Shell :: Openstack on ubuntu 18.04 
Shell :: npm view dist-tags 
Shell :: Install and open HTTP, HTTPS and SSH access in the system firewall 
Shell :: create ionic v3 project 
Shell :: centos show volume usage 
Shell :: Écrire un script qui compte le nombre de fichiers et de répertoires dans le répertoire courant en llinux 
Shell :: proxy v git 
Shell :: upstream revert merge 
Shell :: select adb device to install apk 
Shell :: powershell delete scoop 
Shell :: substitute string in many files 
Shell :: user alternative php version in cpanel ssh 
Shell :: parar serviço na porta 
Shell :: clear old allure results 
Shell :: Convert a music file (mp3) to a mp4 video with a static image 
Shell :: Edit remote files within Vim session 
Shell :: polyfill download 
Shell :: checkra1 
Shell :: instalar Git en PowerShell 
Shell :: how to take a screenshot on ubuntu 
Shell :: install media library 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =