Skip to content

Instantly share code, notes, and snippets.

@UltimateNova1203
Last active June 9, 2024 17:00
Show Gist options
  • Save UltimateNova1203/534095e4728f84b61c394f45db0ca26b to your computer and use it in GitHub Desktop.
Save UltimateNova1203/534095e4728f84b61c394f45db0ca26b to your computer and use it in GitHub Desktop.
Bash Prompt Setup
# Export paths for shell to use
export VISUAL='/usr/bin/nano'
export EDITOR='/usr/bin/nano'
# Enable color support
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias ip='ip --color=auto'
# Alias for LS
alias ll='ls -lAh --si --color=always'
alias la='ls -Ah --si --color=always'
alias l='ls -CFh --si --color=always'
alias ls='ls --color=always'
# Alias for disk/memory free
alias df='df -h --si'
alias free='free -h --si'
# Enable color support for man
export LESS="--RAW-CONTROL-CHARS"
## Appearance of "blink" text
export LESS_TERMCAP_mb=$(tput bold; tput setaf 2) # Bold Green
## Appearance of "bold" text
export LESS_TERMCAP_md=$(tput bold; tput setaf 1) # Bold Red
## Reset appearance of "bold" and "blink" text
export LESS_TERMCAP_me=$(tput sgr0)
## Appearance of "standout" text
export LESS_TERMCAP_so=$(tput bold; tput setaf 3) # Yellow
## Reset appearance of "standout" text
export LESS_TERMCAP_se=$(tput rmso; tput sgr0)
## Appearance of "underline" text
export LESS_TERMCAP_us=$(tput smul; tput bold; tput setaf 6) # Underline Cyan
## Reset appearance of "underline" text
export LESS_TERMCAP_ue=$(tput rmul; tput sgr0)
## Appearance of "reverse" video text
export LESS_TERMCAP_mr=$(tput rev)
## Appearance of "dim" text
export LESS_TERMCAP_mh=$(tput dim)
## Appearance of subscript mode
export LESS_TERMCAP_ZN=$(tput ssubm)
## Ends subscript mode
export LESS_TERMCAP_ZV=$(tput rsubm)
## Appearance of superscript mode
export LESS_TERMCAP_ZO=$(tput ssupm)
## Ends superscript mode
export LESS_TERMCAP_ZW=$(tput rsupm)
export GROFF_NO_SGR=1
# Export shell colors
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
PS1='\[\e[92m\]\u@\h\[\e[0m\]:\[\e[96m\]\W\[\e[0m\] \$ '
unset rc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment