From 056b91da1d9cdf6d8312d3e996019bb8fb4faadb Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Sun, 23 Dec 2018 21:23:00 +0100 Subject: [PATCH] Add file/dir count to prompt and short prompt --- bashrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bashrc b/bashrc index 64216a2..fc42d6f 100644 --- a/bashrc +++ b/bashrc @@ -107,5 +107,10 @@ git__prompt () { fi } -PS1='\[\033[00;34m\]┌─╼ \[\033[00;33m\]\$ \[\033[01;35m\]\u\[\033[00;34m\]@\[\033[01;35m\]\h\[\033[01;34m\] `date +%d.%m.%y` \[\033[01;35m\]\w`git__prompt`\[\033[00m\] +PS1n='\[\033[00;34m\]┌─╼ \[\033[01;34m\]`date +%d.%m.%y` \[\033[00;33m\]\$ \[\033[01;35m\]\u\[\033[00;34m\]@\[\033[01;35m\]\h`git__prompt` \[\033[01;35m\]\w \[\033[01;34m\]`find -maxdepth 1 -type d | wc -l`\[\033[00;34m\]d \[\033[01;32m\]`find -maxdepth 1 -type f | wc -l`\[\033[00;32m\]f\[\033[00m\] \[\033[00;34m\]└╼ \[\033[00m\]' + +PS1c='\[\033[00;34m\]┌─╼ \[\033[00;33m\]\$ \[\033[01;35m\]\u`git__prompt` \[\033[01;35m\]`basename \`dirs +0\`` \[\033[01;34m\]`find -maxdepth 1 -type d | wc -l`\[\033[00;34m\]d \[\033[01;32m\]`find -maxdepth 1 -type f | wc -l`\[\033[00;32m\]f\[\033[00m\] +\[\033[00;34m\]└╼ \[\033[00m\]' + +PS1=$PS1n