1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2026-01-02 08:21:09 +01:00

unposted: a few cosmetic format fixes in docs

This commit is contained in:
Jun-ichi Takimoto 2015-11-13 01:02:37 +09:00
parent ff85c8b1c9
commit d5ba08af49
8 changed files with 15 additions and 20 deletions

View file

@ -3,6 +3,10 @@
* 37090: Doc/zman.yo, Doc/ztexi.yo: handle blank lines correctly
in yodl macro example()
* unposted: Doc/Zsh/builtins.yo, Doc/Zsh/contrib.yo,
Doc/Zsh/func.yo, Doc/Zsh/grammar.yo, Doc/Zsh/mod_pcre.yo,
Doc/Zsh/params.yo, Doc/Zsh/zle.yo: cosmetic format fix
2015-11-12 Peter Stephenson <p.stephenson@samsung.com>
* 37096: Src/subst.c, Test/D04parameter.ztst: make top-level

View file

@ -558,8 +558,7 @@ For example:
example(emulate sh -c 'fni+LPAR()RPAR() { setopt cshnullglob; }
fno+LPAR()RPAR() { fni; }'
fno
)
fno)
The two functions tt(fni) and tt(fno) are defined with sticky tt(sh)
emulation. tt(fno) is then executed, causing options associated

View file

@ -1755,7 +1755,7 @@ a customised bookmark string for the tt(hg) backend.
Again, we start off by registering a function:
example(zstyle ':vcs_info:hg+gen-hg-bookmark-string:*' hooks hgbookmarks)
And then we define the `tt(+vi-hgbookmarks) function:
And then we define the `tt(+vi-hgbookmarks)' function:
example(
function +vi-hgbookmarks+LPAR()RPAR() {
# The default is to connect all bookmark names by
@ -1780,8 +1780,7 @@ function +vi-hgbookmarks+LPAR()RPAR() {
# something other than the default zero:
ret=1
return 0
}
)
})
Some longer examples and code snippets which might be useful are available in
the examples file located at Misc/vcs_info-examples in the Zsh source

View file

@ -111,8 +111,7 @@ arguments, at the end.
For example, suppose the autoload file tt(func) contains
example(func+LPAR()RPAR() { print This is func; }
print func is initialized
)
print func is initialized)
then `tt(func; func)' with tt(KSH_AUTOLOAD) set will produce both messages
on the first call, but only the message `tt(This is func)' on the second

View file

@ -421,8 +421,7 @@ works, but
example(if true { # Does not work!
print yes
}
)
})
does em(not), since the test is not suitably delimited.
)

View file

@ -54,8 +54,7 @@ used to implement the "find all non-overlapping matches" functionality.
A simple example of "find all non-overlapping matches":
example(
string="The following zip codes: 78884 90210 99513"
example(string="The following zip codes: 78884 90210 99513"
pcre_compile -m "\d{5}"
accum=()
pcre_match -b -- $string
@ -64,10 +63,7 @@ while [[ $? -eq 0 ]] do
accum+=$MATCH
pcre_match -b -n $b[2] -- $string
done
print -l $accum
)
print -l $accum)
)
enditem()

View file

@ -383,9 +383,7 @@ as part of an arithmetic expression in an ordinary subscript.
To avoid subscript parsing limitations in assignments to associative array
elements, use the append syntax:
example(
aa+=('key with "*strange*" characters' 'value string')
)
example(aa+=('key with "*strange*" characters' 'value string'))
The basic rule to remember when writing a subscript expression is that all
text between the opening `tt([)' and the closing `tt(])' is interpreted

View file

@ -2274,6 +2274,7 @@ the command line or key bindings temporarily.
The following widget, tt(caps-lock), serves as an example.
example(self-insert-ucase+LPAR()RPAR() {
LBUFFER+=${(U)KEYS[-1]}
}
@ -2293,8 +2294,8 @@ zle -D save-caps-lock
(( stat )) && zle send-break
return $stat
)
return $stat)
This causes typed letters to be inserted capitalised until either
tt(accept-line) (i.e. typically the return key) is typed or the
tt(caps-lock) widget is invoked again; the later is handled by saving