From 25a07099725ae28c2ed898d299ca7439cdcd6d2b Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Sun, 29 Jun 2014 17:26:14 -0400 Subject: TOOLS/zsh.pl: sort options in reverse order by length This stops options that are prefixes of other options from blocking completion of values for the longer ones. Conflicts: TOOLS/zsh.pl --- TOOLS/zsh.pl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/TOOLS/zsh.pl b/TOOLS/zsh.pl index 59979015fe..67c0201440 100755 --- a/TOOLS/zsh.pl +++ b/TOOLS/zsh.pl @@ -133,5 +133,14 @@ sub parse_opts { push @list, $entry } + if ($parsing_main_options) { + @list = sort { + $a =~ /(.*?)\:/; my $ma = $1; + $b =~ /(.*?)\:/; my $mb = $1; + + length($mb) <=> length($ma) + } @list; + } + return @list; } -- cgit v1.2.3