From 5f770ab08febe83adc5afbef44103139f98666a8 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Tue, 15 Oct 2019 20:49:18 +0200 Subject: [PATCH] =?UTF-8?q?Add=20option=20-p=20to=20zstyle+=20=E2=80=93=20?= =?UTF-8?q?printing=20of=20the=20style=20to=20the=20stdout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Functions/Misc/zstyle+ | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Functions/Misc/zstyle+ b/Functions/Misc/zstyle+ index 81b4f0552..66a4eb34b 100644 --- a/Functions/Misc/zstyle+ +++ b/Functions/Misc/zstyle+ @@ -17,8 +17,14 @@ # the completion functions are autoloaded without alias expansion (the # -U option to the autoload builtin). The completion system normally # loads its functions with without alias expansion. +# +# Tue Oct 15 20:38:16 CEST 2019 +# The option -p prints the value of the style. The normal usage is to +# use it in place of the option -s and to omit the output parameter. case "$1" in +-p) shift; local value; zstyle -s "$@" value; print -r -- "$value";; + -*) zstyle "$@";; *) setopt localoptions noksharrays -- 2.21.0