SWick

Sysadmin-by-Nature

Entries from March 2024.

Shell Prompt NG
9th March 2024

User

git_branch() {

  BRANCH=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')

  [[ ! -z $BRANCH ]] && echo "[${BRANCH}] "

}

PS1='\n \w \[\e[33;1;12m\]$(git_branch)\[\033[0m\]\n \[\033[1;32m\]>\[\033[0m\] '

root

git_branch() {

  BRANCH=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')

  [[ ! -z $BRANCH ]] && echo "[${BRANCH}] "

}

PS1='\n \w \[\e[33;1;12m\]$(git_branch)\[\033[0m\]\n \[\033[1;31m\]>\[\033[0m\] '
No tags
ssh-tools release 1.8
15th March 2024
No tags

RSS Feed

"People said I should accept the world. Bullshit! I don't accept the world." -- Stallman