Unit #0-04
Learning Outcome
At the end of this lesson, you will be able to:
use some basic .bashrc settings
Lesson
what is a "dot" file or folder in Linux?
hidden (like .git)
ls -la
what is a .bashrc file:
customize your Bash experience
see here
now I can add some commands to my .bashrc file:
# Created by: Mr Coxall
# Created on: Sept-2020
# .bashrc file
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
PS1='\[\e[38;5;135m\]mr-coxall\[\e[38;5;27m\]\[\033[33m\]$(parse_git_branch) ↦ \[\e[0m\]'
PROMPT_DIRTRIM=1 #shows just the current directory name
alias ls='ls --color=auto'
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
Hint: to "paste" into Vim from the system terminal use:
cntr+shift+v
to run the changes do the following command:
source ~/.bashrc