Skip to content

Instantly share code, notes, and snippets.

@ayushhdwi
ayushhdwi / HowTo.md
Last active October 19, 2021 10:54
Simple Bash Prompt Modification

Customizing Bash Prompt

First we have to open bash profile to locate bash prompt. It is available in user's home ~ directory by the name .bashrc. It is set using $PS1 variable.

In all we have $PS1, $PS2, $PS3 and $PS4 variable for the following purposes.

  • PS1 – This is the primary prompt display. This is where you set special characters or important information.
  • PS2 – This is the secondary prompt string. This is usually set as a divider between the prompt display and the text entry. It is also used to display when a long command is broken into sections with the \ sign.
@ayushhdwi
ayushhdwi / .zshrc
Last active October 19, 2021 11:16
Gnome Terminal Padding & PowerLevel10k Config - by @ayushhdwi
# first install lsd package from github release page => (https://github.com/Peltoche/lsd), then
# add the following line at the end of (~/.zshrc) file to use lsd instead of ls
alias ls=lsd
alias ll='lsd -alF'
alias la='lsd -A'
alias l='lsd -F'
alias cls=clear