Bug 8347 - Not possible to write context-aware completers for our autocompletion
Summary: Not possible to write context-aware completers for our autocompletion
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Misc (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: MediumPrio
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-20 11:27 CEST by Frida Flodin
Modified: 2024-06-18 08:51 CEST (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Frida Flodin cendio 2024-05-20 11:27:10 CEST
The completers do not have access to the parser and cannot make any smart completing suggestions. It would be nice to be able to check what has been parsed so far. 

For example, this is needed in hivetool to open the root hive so it can give completions for parameters and folders. Now we have to hard-code the ThinLinc root hive.
Comment 2 Pierre Ossman cendio 2024-06-18 08:51:10 CEST
This is just the tip of the iceberg. The problem is that we mostly use the simplistic approach that bash and bash-completion uses, where you only look at the current and previous word (never mind the word splitting issues in bug 8354).

Ideally, we would parse the entire command line just like we do when running a command normally. Then we would have all the context up to the current point.

It would require a more lenient parser, though, as the command line might not be complete yet.

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