From e7320734153829e8bc94c1255bdeba724e13e8b6 Mon Sep 17 00:00:00 2001 From: Marlon Richert Date: Mon, 17 May 2021 14:49:02 +0300 Subject: 48864: Improve extra-verbose completion display strings for array parameter values --- Test/Y01completion.ztst | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'Test') diff --git a/Test/Y01completion.ztst b/Test/Y01completion.ztst index 2c6d25d9a..882a0adc4 100644 --- a/Test/Y01completion.ztst +++ b/Test/Y01completion.ztst @@ -255,15 +255,18 @@ F:regression test workers/31611 >FI:{file1} >FI:{file2} - comptesteval "bar=({$'\\0'..$'\\C-?'}); baz=\$bar" + comptesteval "typeset -a bar=({$'\\0'..$'\\C-?'})" + comptesteval 'typeset -A bat=( "$bar[@]" )' + comptesteval 'typeset bay="$bar"' comptesteval 'zstyle ":completion:*:parameters" extra-verbose yes' - comptesteval 'zstyle ":completion:*" fake-parameters bar baz:array' + comptesteval 'zstyle ":completion:*" fake-parameters bar bat bay' comptest $': $ba\t' 0:extra-verbose shows parameter values >line: {: $ba}{} >DESCRIPTION:{parameter} ->NO:{bar -- '^@' '^A' '^B' '^C' '^D' '^E' '^F' '^G' '^H' '\t' '\n' '^K' '^L' '^M} ->NO:{baz -- '^@ ^A ^B ^C ^D ^E ^F ^G ^H \t \n ^K ^L ^M ^N ^O ^P ^Q ^R ^S ^T ^U ^} +>NO:{bar -- ( '^@' '^A' '^B' '^C' '^D' '^E' '^F' '^G' '^H' '\t' '\n' '^K' '^L' '} +>NO:{bat -- ( [' ']='!' ['"']='#' ['$']=% ['&']=\' ['(']=')' ['*']=+ [,]=- [.]=/} +>NO:{bay -- '^@ ^A ^B ^C ^D ^E ^F ^G ^H \t \n ^K ^L ^M ^N ^O ^P ^Q ^R ^S ^T ^U ^} comptesteval "path=( $ZTST_srcdir:A )" comptesteval 'typeset -H paths=HIDDEN' @@ -280,7 +283,8 @@ F:regression test workers/31611 >line: {: $ba}{} >DESCRIPTION:{parameter} >NO:{bar} ->NO:{baz} +>NO:{bat} +>NO:{bay} comptesteval '_tst() { local disp=( {a..z} ); compadd -ld disp $disp[@]; comppostfuncs=( _pst ) }' comptesteval '_pst() { local disp=( "$compstate[insert]" ); compadd -Qld disp $disp }' -- cgit 1.4.1