Custom powerfull bash prompt.
- autodetection of GIT dirs
- kubernetes context name and current namespace
- various usefull functions and aliases
You can see some basic information. From the left username@hostname, actual time, actual working directory. On the next line you can see bash command reference number of actual command. You can repeat command from history by typing this string eg !2167
In first we execute command false, so you can see indication on the next prompt with red sign (!), it means that last command has non 0 return code.
- Prompt automatically detect that you are in GIT repository and display some basic git info like actual REF, Modified files, Added files and Deleted file.
- It can also detect Git Submodules and gives you indication of that
- It inform you if you have stashed changes in git
- you can turn off git prompt permanently in
.bash_funcor temporarly withgitprompt off
- For gitlab you can see your gitlab user.name and email
- you can turn off gituser prompt permanently in
.bash_funcor temporarly withgituserprompt off
- For kubernetes you can see current active context and default namespace for that context.
- you can turn off kube prompt permanently in
.bash_funcor temporarly withkubeprompt off
GIT
log, viz screenshotlogd, viz screenshotcommitforgit commit -a -mcmforgit commit -mpushforgit pushcheckforgit checkoutfetchforgit fetchsubupforgit submodule updatesubpullforfit submodule foreach git pullgnewforgit checkout -b
Kubernetes
kfor kubectlkconfor changing kubernetes config contextknamefor changing default namespace for contextkshowfor showing all contexts
Debian/Ubuntu packaging
pkgi, forsudo apt-get installpkgs, forapt-cache searchpkgr, forsudo apt-get remove
Others
fuck, run last command with sudosvim, run vim with sudo
Copy all '.bash' files to your home directory
git clone https://github.com/rvojcik/bash-git-prompt.git
cd bash-git-prompt
cp -rfp ./.bash* ~/
If you have some own customization of these files, backup them first.
cd ~/
mkdir backup-files
cp -rfp ~/.bash* ~/backup-files/





