Skip to content

Instantly share code, notes, and snippets.

@tur1ngb0x
Created October 15, 2023 09:29
Show Gist options
  • Save tur1ngb0x/21a42373a9418fdcd33f1ae73c452346 to your computer and use it in GitHub Desktop.
Save tur1ngb0x/21a42373a9418fdcd33f1ae73c452346 to your computer and use it in GitHub Desktop.
minmal-cli.md

$HOME/.bashrc

# init
[[ -z "${PS1}" ]] && return
[[ -f /usr/share/bash-completion/bash_completion ]] && source /usr/share/bash-completion/bash_completion || echo 'bash-completion not found'

# behaviour
shopt -s checkwinsize
shopt -s histappend

# prompt
[[ "$(id -u)" -eq 0 ]] && PS1='\[\e[91m\]\u@\h \[\e[93m\]\w\n\[\e[0m\]# ' && PS1="\[\e]0;\u@\h \w\a\]${PS1}" && export PS1
[[ "$(id -u)" -ne 0 ]] && PS1='\[\e[92m\]\u@\h \[\e[96m\]\w\n\[\e[0m\]$ ' && PS1="\[\e]0;\u@\h \w\a\]${PS1}" && export PS1

$HOME/.profile

if test -f "${HOME}"/.bashrc; then . "${HOME}"/.bashrc; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment