Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [Bulk] Re: [PATCH] Add xxd completion

} Daniel Shahaf wrote:
} > Done.  'xxd -grou<tab>' now DTRTs; however, 'xxd -g<tab>' gives me:
} > 
} >     % xxd -g<tab>
} >     -groupsize  -- specify the number of octets per group
} > 
} > and the display doesn't change even if I press <tab> again. This
} > seems odd: why am I not offered both -g and -groupsize as possible
} > completions?

At this point in the completion, "-g" is an ignored prefix of the
"-g+" completion, which means it is part of the word to be completed
but should not be shown in the list of matches.  So it isn't.

} > And if "-groupsize" is offered in the message, why does pressing
} > <tab> not complete the command-line word to the one possible
} > completion?

The listing doesn't change on subsequent TABs because the fact that -g
is a possible completion makes -groupsize ambiguous.  You have to do
something to disambiguate, e.g., type a number (of octets) or an "r"
before pressing TAB.

On Oct 11, 11:46am, Oliver Kiddle wrote:
} It'll perhaps seem clearer if you set the format style with the
} descriptions tag

We had a brief discussion a few weeks ago of supplying a set of default
zstyles, I've been gradually building up a suggested list.  Both of
these were the first things on it:

}   zstyle ':completion:*:descriptions' format '%B%d%b'
}   zstyle ':completion:*' group-name ''
} This makes it clearer that you have two groups, one of which has no
} associated matches, just a heading.
} What subsequent tab presses does, depends a lot on your configuration.

In this case it doesn't, really; because one of the groups is empty,
there's not much else that can happen, e.g., menu completion has no
alternatives to cycle through.

Messages sorted by: Reverse Date, Date, Thread, Author