Re: Color shell prompts (was Re: FreeBSD 4.8-RELEASE mutt color(color))
Joshua Oremzn [EMAIL PROTECTED] writes: [snip] It makes a prompt like this, but in color: --[ /, 33 files / 10M ]-- --[ 10:23 AM ]-- --[ oremanj @ webserver.get-linux.org[0] / ttyv1 ]-- --[ 136 processes ]-- --[ 4 users ]-- --[ % ]-- command-goes-here -- Josh P.S. Of course I don't use that prompt! And why not? It is a very helpful and informative prompt. And please don't complain that it is too long; surely everyone now runs xterm fullscreen on 1600x1200 with a 5x7 font! ;-) (ok, so the laptop which is my primary computer doesn't do 1600x1200, and I don't run xterm full screen :-) ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: FreeBSD 4.8-RELEASE mutt color (color)
Speaking of color. Does anyone have a good tutorial/script to add color in bash as one finds in the newer linux distributions? Kyle Jamieson wrote: I'm running 4.8-RELEASE; relatively new to FreeBSD. I get color in vim and ls, but not mutt. How can I get color in mutt? - yes, I've tried setting TERM=xterm-color; no change. - yes, I've installed ncurses; no change. - yes, I realize this may be a mutt-specific q, but I'm asking for help here. Thanks for any help you can give. __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Color shell prompts (was Re: FreeBSD 4.8-RELEASE mutt color(color))
On Mon, Jul 14, 2003 at 12:51:43PM -0400 or thereabouts, Kevin Berrien wrote: Speaking of color. Does anyone have a good tutorial/script to add color in bash as one finds in the newer linux distributions? The Bash-Prompt HOWTO @ tldp.org is a good one. Just to give you an idea about how crazy this all can get, take a look at this prompt (for zsh). Note that ^[ means the real ESC character, not caret + left bracket. Sorry about the long lines: PS1='%{^[[1;34m%}--[ %{^[[1;36m%}$(pwd), $(ls -1 | wc -l | tr -d ) files / ${SIZE}%{^[[1;34m%} ]-- --[ %{^[[1;36m%}$(date +%I:%M %p)%{^[[1;34m%} ]-- --[ %{^[[1;36m%}%n @ %M[$(jobs | wc -l | tr -d )] / $(tty | sed s:/dev/pts/:ttyp:g;s:/dev/::g)%{^[[1;34m%} ]-- --[ %{^[[1;36m%}$(ps ax | wc -l | tr -d ) processes%{^[[1;34m%} ]-- --[ %{^[[1;36m%}$(who | wc -l | tr -d ) users%{^[[1;34m%} ]-- --[ %{^[[1;36m%}%# %{^[[1;34m%}]-- %{^[[0m%}' PS2='%{^[[1;34m%}--[ %{^[[1;36m%}%_ %{^[[1;34m%}]-- %{^[[0m%}' function precmd () { let TotalBytes=0 for Bytes in $(command ls -l | grep ^- | awk '{ print $5 }') do let TotalBytes=$TotalBytes+$Bytes done if [ $TotalBytes -lt 1024 ]; then TotalSize=$(echo -e scale=0 \n$TotalBytes \nquit | bc | tr -d '\n') suffix= bytes elif [ $TotalBytes -lt 1048576 ]; then TotalSize=$(echo -e scale=0 \n$TotalBytes/1024 \nquit | bc | tr -d '\n') suffix=K elif [ $TotalBytes -lt 1073741824 ]; then TotalSize=$(echo -e scale=0 \n$TotalBytes/1048576 \nquit | bc | tr -d '\n') suffix=M else TotalSize=$(echo -e scale=0 \n$TotalBytes/1073741824 \nquit | bc | tr -d '\n') suffix=G fi SIZE=${TotalSize}${suffix} UPTIME=`uptime | sed -e 's/.* \(.* days,\)\? \(.*:..,\) .*/\1 \2/' \ -e 's/,//g' -e 's/ up //'` } It makes a prompt like this, but in color: --[ /, 33 files / 10M ]-- --[ 10:23 AM ]-- --[ oremanj @ webserver.get-linux.org[0] / ttyv1 ]-- --[ 136 processes ]-- --[ 4 users ]-- --[ % ]-- command-goes-here -- Josh P.S. Of course I don't use that prompt! ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Color shell prompts (was Re: FreeBSD 4.8-RELEASE mutt color(color))
On Mon, Jul 14, 2003 at 06:41:48PM -0400, Kevin Berrien wrote: I was thinking of something a bit more practical, like the color changes for file types (dirs, etc..). Oh, that :-) man ls basically: export CLICOLOR=y -- Josh Joshua Oremzn wrote: On Mon, Jul 14, 2003 at 12:51:43PM -0400 or thereabouts, Kevin Berrien wrote: Speaking of color. Does anyone have a good tutorial/script to add color in bash as one finds in the newer linux distributions? The Bash-Prompt HOWTO @ tldp.org is a good one. Just to give you an idea about how crazy this all can get, take a look at this prompt (for zsh). Note that ^[ means the real ESC character, not caret + left bracket. Sorry about the long lines: snip horrendous-looking prompt :- -- Josh P.S. Of course I don't use that prompt! ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]