diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2010-03-19 21:11:15 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2010-03-19 21:11:15 +0000 |
commit | 7dd4c69371b1b8a3bdb7e89a14f1750559b8cc42 (patch) | |
tree | f6dd61d2c7dc2740b905b6d2c6b9e55b04fe2098 | |
parent | 5e629a45659e512fae2f3a7f411f12f82defeeb5 (diff) | |
download | zsh-7dd4c69371b1b8a3bdb7e89a14f1750559b8cc42.tar.gz zsh-7dd4c69371b1b8a3bdb7e89a14f1750559b8cc42.tar.xz zsh-7dd4c69371b1b8a3bdb7e89a14f1750559b8cc42.zip |
FAQ update
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | Etc/FAQ.yo | 42 |
2 files changed, 36 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog index 7ad83b2e0..a06769f53 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-03-19 Peter Stephenson <p.w.stephenson@ntlworld.com> + + * unposted: Etc/FAQ.yo: update section on coloured prompts and + some other minor bits. + 2010-03-19 Peter Stephenson <pws@csr.com> * unposted: Functions/Calendar/calendar: update previous @@ -12938,5 +12943,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.4939 $ +* $Revision: 1.4940 $ ***************************************************** diff --git a/Etc/FAQ.yo b/Etc/FAQ.yo index 3ebae61eb..808b88cab 100644 --- a/Etc/FAQ.yo +++ b/Etc/FAQ.yo @@ -588,10 +588,11 @@ tt(EXTENDED_GLOB). occurred somewhere in the path (e.g. mytt(users/barstaff/foo) will be excluded by the mytt(~) operator). As the mytt(**) operator cannot be grouped (inside parentheses it is treated as mytt(*)), this is - the way to exclude some subdirectories from matching a mytt(**). + one way to exclude some subdirectories from matching a mytt(**). + The form (^foo/)# also works. it() Unquoted assignments do file expansion after mytt(:)s (intended for PATHs). - it() mytt(typeset) and mytt(integer) have special behaviour for + it()* mytt(typeset) and mytt(integer) have special behaviour for assignments in ksh, but not in zsh. For example, this doesn't work in zsh: verb( @@ -605,7 +606,7 @@ tt(EXTENDED_GLOB). itemize( it()* There is no tt($ENV) variable (use tt(/etc/zshrc), tt(~/.zshrc); note also tt($ZDOTDIR)). - it() tt($PATH) is not searched for commands specified + it()* tt($PATH) is not searched for commands specified at invocation without -c. ) it() Aliases and functions: @@ -1738,14 +1739,31 @@ sect(What's wrong with cut and paste on my xterm?) sect(How do I get coloured prompts on my colour xterm?) - (Or `color xterm', if you're reading this in black and white.) You need - to find the sequences which generate the various colours from the manual - for your terminal emulator; these are ANSI standard on those I know about - which support colour. With a recent (post 3.1.6) distribution of zsh, - there is a theme system to handle this for you; even if you don't see that, - the installed function `mytt(colors)' (meaning `colours', if you're not - reading this in black and white) gives the escape sequences. You will end - up with code looking like this (borrowed from Oliver Kiddle): + (Or `color xterm', if you're reading this in black and white.) + + Versions of the shell starting with the 4.3 series have this + built in. Use + verb( + PS1='%K{white}%F{red}<red on white>%f%k<default colours>' + ) + to change the prompt. Names are only usable for the colours + black, red, green, yellow, blue, magenta, cyan and white, understood + by most terminals, but if you happen to know the details of how + your terminal implements colours you can specify a number, e.g. + mytt(%20F) to turn the foreground into colour number 20. mytt(echotc + Co) will often output the number of colours the terminal supports. + (Careful: mytt(echotc co) is different; it also outputs a number + but it's the number of columns in the terminal.) If this is 8 + then probably you have the named colours and nothing more. + + In older versions of the shell you need to find the sequences which + generate the various colours from the manual for your terminal + emulator; these are ANSI standard on those I know about which support + colour. With a recent (post 3.1.6) distribution of zsh, there is a + theme system to handle this for you; even if you don't see that, the + installed function `mytt(colors)' (meaning `colours', if you're not + reading this in black and white) gives the escape sequences. You will + end up with code looking like this (borrowed from Oliver Kiddle): verb( PS1=$'%{\e[1;31m%}<the rest of your prompt here>%{\e[0m%}' ) @@ -2002,7 +2020,7 @@ sect(What is multibyte input?) just needs to ask the system library how many octets form the next character, and if there's a valid character there at all. (It can also ask the system what width the character takes up on the screen, so that - characters no longer need to be exacxtly one position wide.) + characters no longer need to be exactly one position wide.) The way this is done is called UTF-8. Multibyte encodings of other character sets exist (you might encounter them for Asian character sets); |