export PS1='\n($?, $(cat /proc/loadavg | colrm 5 | xargs), $(du -hs | colrm 8 | xargs), $(ls -1 | wc -l)) \u@\H:\w/\n\$ '
this outputs something like
(0, 0.85, 6.8g, 13) david@sixhat.net:~/
$
where the individual values are (in order):
$?
$(cat /proc/loadavg | colrm 5 | xargs)
$(du -hs | colrm 8 | xargs)
$(ls -1 | wc -l)
\u@\h:\w/
the prompt type (normal $ | root #) \$ |
notice that it has no colours. although colours are a nice feature to have, they don’t work in every terminal, but within your .profile
you can do conditional prompts based on colour support by the terminal.
well, zsh prompts are a little bit different to configure, but a similar one that i use in my macs is this:
export PS1='
%T %(1d.%B[First Day of Month]%b .)%U(%?,%j)%u %n@%m %F{red}%0~%f
%F{green}%B%(!.%#.;)%b%f '
The expansions are different from bash, so you are better off reading the manual about expansions, but the above one can give you a nice start.