about summary refs log tree commit diff
path: root/Doc/Zsh
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2024-01-24 17:32:45 -0800
committerBart Schaefer <schaefer@zsh.org>2024-01-24 17:32:45 -0800
commitc72b4a74ef3e5031a72cab13d7d6365e8d7ef0fc (patch)
tree11f76c400568fd7805a900a841762fce492e1cfe /Doc/Zsh
parent3406089647393c7593e37ee0661a179a9d848c49 (diff)
downloadzsh-c72b4a74ef3e5031a72cab13d7d6365e8d7ef0fc.tar.gz
zsh-c72b4a74ef3e5031a72cab13d7d6365e8d7ef0fc.tar.xz
zsh-c72b4a74ef3e5031a72cab13d7d6365e8d7ef0fc.zip
52473: zstyle -q for testing existence of a zstyle setting
Diffstat (limited to 'Doc/Zsh')
-rw-r--r--Doc/Zsh/mod_zutil.yo7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/Zsh/mod_zutil.yo b/Doc/Zsh/mod_zutil.yo
index 3cf9e5028..9946618d6 100644
--- a/Doc/Zsh/mod_zutil.yo
+++ b/Doc/Zsh/mod_zutil.yo
@@ -11,6 +11,7 @@ xitem(tt(zstyle) [ tt(-L) [ var(metapattern) [ var(style) ] ] ])
 xitem(tt(zstyle) [ tt(-e) | tt(-) | tt(-)tt(-) ] var(pattern) var(style) var(string) ...)
 xitem(tt(zstyle -d) [ var(pattern) [ var(style) ... ] ])
 xitem(tt(zstyle -g) var(name) [ var(pattern) [ var(style) ] ])
+xitem(tt(zstyle -q) var(context) var(style))
 xitem(tt(zstyle -){tt(a)|tt(b)|tt(s)} var(context) var(style) var(name) [ var(sep) ])
 xitem(tt(zstyle -){tt(T)|tt(t)} var(context) var(style) [ var(string) ... ])
 item(tt(zstyle -m) var(context) var(style) var(pattern))(
@@ -105,6 +106,12 @@ enditem()
 The other forms can be used to look up or test styles for a given context.
 
 startitem()
+item(tt(zstyle -q) var(context) var(style))(
+Return tt(0) if var(style) is defined in var(context).  This does not
+evaluate expressions defined by tt(zstyle -e) and does not examine any
+values set by var(style).  The expected use is to test whether a style
+has been defined for var(context) before asserting a new style.
+)
 item(tt(zstyle -s) var(context) var(style) var(name) [ var(sep) ])(
 The parameter var(name) is set to the value of the style interpreted as a
 string.  If the value contains several strings they are concatenated with