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

Re: PATCH: list units in brackets at the end of completion group descriptions



Oliver Kiddle wrote on Fri, 27 Aug 2021 11:52 +00:00:
> There might be some more useful way we might indicate where suffixes can
> be appended to a value to denote units. Completing them after a number
> doesn't really make the options clear before a number has been entered.
> Perhaps an initial slash, e.g. 'timeout (seconds) [5] /ms /us /ns'

This design first says "Input a value in seconds", then the default
value, then goes back to say that other units are possible.

I think we should try for a design with more locality in the provision
of information.  For instance, assuming the default unit may also be
specified explicitly:

    timeout [5 = 5s]
    # This intends to communicate that both «5» and «5s» are valid inputs, and equivalent.

    timeout [5] ; hr/[s]/ms/us/ns
    # Indicate the default value and default unit separately, indicating all units in a group

I'm sure there are better options than these.

Cheers,

Daniel




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