Bug 8422 - tl-session-param tabcompletion is fragile
Summary: tl-session-param tabcompletion is fragile
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Misc (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: LowPrio
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-09 15:02 CEST by Adam Halim
Modified: 2024-09-10 13:31 CEST (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Adam Halim cendio 2024-09-09 15:02:41 CEST
Generated completion words for tl-session-param are right now filtered in two different places: tl-session-param and optcomplete. This makes the code hard to follow and difficult to test, causing it to be fragile.

For specific completers like this, some of them in other scripts sanitize their own suggestions, while others rely on optcomplete to filter suggestions.

Due to how we've built things, optcomplete's filtering will always be active. But the code in tl-session-param's completers rely on a mix of filtering-sources, as mentioned above.
Comment 1 Adam Halim cendio 2024-09-09 15:49:39 CEST
A good way to simplify things and probably work around this bug is to base the suggestions from the tl-session-param completer function on the prefix. Right now, we start from the root of the parameter structure, regardless of the prefix.

Note You need to log in before you can comment on or make changes to this bug.