Prompt
From ThorxWiki
(Difference between revisions)
(.) |
(update to note bg job count and other tweaks) |
||
Line 1: | Line 1: | ||
== my personal (zsh) prompt setups has, on one line == |
== my personal (zsh) prompt setups has, on one line == |
||
− | * last exit status (teal normally, red with number when non-zero |
+ | * last job exit status (invisible when zero) |
* host:path in network friendly (ish) format |
* host:path in network friendly (ish) format |
||
* path shortening to last three components, plus subtle visual indication when this occurs |
* path shortening to last three components, plus subtle visual indication when this occurs |
||
− | * path colourisation to indicate $PWD RW vs RO |
+ | ** this shortening balances path context needs with space limitations. and is why the preceeding 'network friendly' format is "ish" :) |
+ | * path colourisation to indicate whether $PWD is RW or not (not usually means RO, but may also mean 'directory does not exist') |
||
+ | * count of background jobs (invisible if zero) |
||
* ^ and $ reminder mnemonic for regex start/end line matching (I have a dyslexia about this!) |
* ^ and $ reminder mnemonic for regex start/end line matching (I have a dyslexia about this!) |
||
− | * live time and load average (load gets dynamic colourisation also) |
+ | * live time and load average (load gets dynamic colourisation also, but is invisible below threshold (set to 0.3 for me) |
** for values of "live" that = "20 second refresh" |
** for values of "live" that = "20 second refresh" |
||
+ | ** this refresh ensures that an abandoned prompt will keep-alive a remote shell over dodgy NAT :) |
||
* current tty |
* current tty |
||
Revision as of 11:06, 11 May 2010
my personal (zsh) prompt setups has, on one line
- last job exit status (invisible when zero)
- host:path in network friendly (ish) format
- path shortening to last three components, plus subtle visual indication when this occurs
- this shortening balances path context needs with space limitations. and is why the preceeding 'network friendly' format is "ish" :)
- path colourisation to indicate whether $PWD is RW or not (not usually means RO, but may also mean 'directory does not exist')
- count of background jobs (invisible if zero)
- ^ and $ reminder mnemonic for regex start/end line matching (I have a dyslexia about this!)
- live time and load average (load gets dynamic colourisation also, but is invisible below threshold (set to 0.3 for me)
- for values of "live" that = "20 second refresh"
- this refresh ensures that an abandoned prompt will keep-alive a remote shell over dodgy NAT :)
- current tty
ideas I don't currently implement
- per-host auto-colourisation
- vcs_info (I would probably replace tty info with this, with a colourisation to help the glancing eye notice)
My prompt config is not currently online, but will be made so on request. I hope to 'publish' it properly soon when I have it cleaned up a bit more. :)