From 7d2f8050088f61444fc6117cf1e7bfe8d440d73c Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Wed, 16 Nov 2016 09:42:49 +0100 Subject: 39945: allow further tab presses to move on to menu completion even when compstate[insert] is emptied --- Test/Y03arguments.ztst | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) (limited to 'Test') diff --git a/Test/Y03arguments.ztst b/Test/Y03arguments.ztst index 3ada16844..0763c419d 100644 --- a/Test/Y03arguments.ztst +++ b/Test/Y03arguments.ztst @@ -243,6 +243,67 @@ >NO:{-a} >NO:{-b} + tst_arguments --abc --aah :arg: + comptesteval 'setopt bashautolist automenu' + comptest $'tst --a\t\t\t' +0:with message and bashautolist, a third tab will get menu completion +>line: {tst --a}{} +>line: {tst --a}{} +>DESCRIPTION:{arg} +>DESCRIPTION:{option} +>NO:{--aah} +>NO:{--abc} +>line: {tst --aah}{} + + tst_arguments --abc --aah :arg: + comptesteval 'setopt bashautolist noautomenu' + comptest $'tst --a\t\t\t' +0:with message and bashautolist, a third tab is needed to display the list +>line: {tst --a}{} +>line: {tst --a}{} +>DESCRIPTION:{arg} +>DESCRIPTION:{option} +>NO:{--aah} +>NO:{--abc} +>line: {tst --a}{} + + tst_arguments --abc --aah :arg: + comptesteval 'setopt nobashautolist noautomenu' + comptest $'tst --\t\t' +0:with message and noautomenu second tab redisplays the list +>line: {tst --}{} +>DESCRIPTION:{arg} +>DESCRIPTION:{option} +>NO:{--aah} +>NO:{--abc} +>line: {tst --}{} +>DESCRIPTION:{arg} +>DESCRIPTION:{option} +>NO:{--aah} +>NO:{--abc} + + tst_arguments --abc --aah :arg: + comptesteval 'setopt nobashautolist automenu' + comptest $'tst --\t\t' +0:with message two tabs will start menu completion +>line: {tst --}{} +>DESCRIPTION:{arg} +>DESCRIPTION:{option} +>NO:{--aah} +>NO:{--abc} +>line: {tst --aah}{} + + tst_arguments --abc --aah :arg: + comptesteval 'zstyle ":completion:*::::" completer _oldlist _complete' + comptest $'tst --\t\t' +0:with message and _oldlist, two tabs will start menu completion +>line: {tst --}{} +>DESCRIPTION:{arg} +>DESCRIPTION:{option} +>NO:{--aah} +>NO:{--abc} +>line: {tst --aah}{} + %clean zmodload -ui zsh/zpty -- cgit 1.4.1