-
Notifications
You must be signed in to change notification settings - Fork 60
Description
Since 621983e cmdliner's doclang is handled in the doc strings used for completion descriptions. We found it natural to use ANSI escapes in the doc string renders and this is specified in the protocol.
However this works only some of the time. Here are a few problems:
- If the doc string is long. It is arbitrarily cut to fit the terminal. First this is not nice from a usability perspective, who wants to read truncated doc strings ? Second it may cut out an ANSI mode reset, which means bold/italic glitches in the list of completions.
- It seems that when the
zshcompletion system collapses short and long option it escapes the escapes.
E.g.:But (with> b0 -␉ --b0-dir -- Use ^[[04mDIR^[[m for the b0 directory. --b0-file -- Use ^[[04mPATH^[[m as the b0 file. --build -b -- Build only. Do not execute the action.DIR,PATHvariables correctly ANSI underlined):> b0 --␉ --b0-dir -- Use DIR for the b0 directory. --b0-file -- Use PATH as the b0 file.
Regarding 1. I wonder if there is a way to be able to specify multi-line completion descriptions in zsh. Regarding 2. I wonder if there is a way to indicate to zsh. Answering these questions likely involves going to look at their code as trying to get anything meaningful from their docs is a challenge.
Another option of course is to strip the escapes from the doc strings in the completion script – I rather keep them in the protocol, perhaps one day we'll get less duck taped completion systems.