Bug 8423 - tl-config tab completion suggests invalid paths
Summary: tl-config tab completion suggests invalid paths
Status: CLOSED WONTFIX
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Misc (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.19.0
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-10 17:41 CEST by Adam Halim
Modified: 2025-04-02 08:53 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Adam Halim cendio 2024-09-10 17:41:10 CEST
Given a hive structure like below, with nested folders:

> # tl-config -Ra /a/
> b/
>     c/
>         param3 = hej

When tabcompleting the below commandline:
> # tl-config /a/b/c/
On the first <TAB> press we don't get any suggestions, but the second time, it suggests:
> /a/b/c/        /a/b/c/param3
This is wrong for two reasons:

1. The command "tl-config /a/b/c/" is not valid, it will produce the following error:
> /a/b/c/: No such parameter
Our point is that our tab completion shouldn't suggest paths that will cause errors.


2. It should suggest "/a/b/c/param3" right away, since its the only valid option.
Comment 1 Samuel Mannehed cendio 2025-04-02 08:53:32 CEST
A decision was taken on this subject on bug 8384 and bug 8371. We will not aim to tab complete as far as possible in tl-config. We will consistently complete only one level at a time. It feels the most natural, and the user will not suddenly get a long completion suggestion sometimes.

Looking at `dconf` for example, it behaves like tl-config does now. Given a dconf folder "/system/locale/" with only a key "region" inside, the tab completion from "/system/" will still require the user to first step to "/system/locale/" and then to "/system/locale/region" in a second step.

This also matches the behavior of `ls` tab completion.

Closing this.

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