Skip to content

Instantly share code, notes, and snippets.

@wdog
Created September 13, 2017 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wdog/4b779068ac8379eaafbb5d37e2621da0 to your computer and use it in GitHub Desktop.
Save wdog/4b779068ac8379eaafbb5d37e2621da0 to your computer and use it in GitHub Desktop.
wdog bash prompt
#!/bin/sh
function fy(){
echo $(/bin/ls -lah | /bin/grep -m 1 total | /bin/sed 's/total //')
}
function fx(){
echo $(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g')
}
export PS1="\[$(tput bold)\]\[\033[38;5;39m\]\u\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput bold)\]\[$(tput sgr0)\]\[\033[38;5;220m\]\w\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;15m\]\[$(tput bold)\]\[\033[38;5;36m\] [\$(fy) files \$(fx)] \[$(tput bold)\]\[\033[38;5;226m\] \n=>\[$(tput sgr0)\]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment