Bug 8384 - Some config paths in tl-config can't be tab completed
Summary: Some config paths in tl-config can't be tab completed
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Misc (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.19.0
Assignee: Samuel Mannehed
URL:
Keywords: linma_tester, relnotes
Depends on:
Blocks: 8553
  Show dependency treegraph
 
Reported: 2024-07-12 11:18 CEST by Samuel Mannehed
Modified: 2025-04-04 10:55 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:
MUST * No folders should be missing when tab completing with tl-config


Attachments

Description Samuel Mannehed cendio 2024-07-12 11:18:35 CEST
When tab completing, only the following top-level folders are suggested:

> $ tl-config /
> /profiles/      /shadowing/     /vsmagent/      /webaccess/     
> /sessionstart/  /vsm/           /vsmserver/     

As seen below, there are some folders missing from our tab completion suggestions:

> $ tl-config --all-entries /
> printing/
> profiles/
> sessionstart/
> shadowing/
> utils/
> vsm/
> vsmagent/
> vsmserver/
> webaccess/

The folders “printing” and “utils” are missing.
Comment 1 Samuel Mannehed cendio 2024-08-23 10:37:29 CEST
When working on bug 8359 I found that the issue comes from incorrect assumptions that file names and hiveconf's folder-names always match. For example, see hivetool:252.

The file which contains the “printing” folder is called “nearest.hconf”. While the “utils” folder is found in three different files.

We should use `hive.get_folders("/")` instead of `hive.sources`.
Comment 6 Samuel Mannehed cendio 2025-03-31 14:37:08 CEST
With bug 8553, this issue has become more widespread. When tab completing, only the following top-level folders are suggested:

> $ tl-config /
> /profiles/      /shadowing/     /vsmagent/      /webaccess/     
> /sessionstart/  /vsm/           /vsmserver/     


As seen below, there are some folders missing from our tab completion suggestions:

> $ tl-config --all-entries /
> subclusters/
> agents/
> HA/
> printing/
> profiles/
> sessionstart/
> shadowing/
> utils/
> vsm/
> vsmagent/
> vsmserver/
> webaccess/

The folders "subclusters", "agents", "HA", “printing” and “utils” are missing.
Comment 17 Samuel Mannehed cendio 2025-04-02 08:10:09 CEST
Fixed now. The completion code was also heavily cleaned up. Both the all_entries_completer() and param_completer() have been basically rewritten. The code is much simpler now, and easier to follow.

Using build 3974 on Fedora 41 I get the following tab completion suggestions:

> $ tl-config /
> /agents/        /printing/      /sessionstart/  /subclusters/   /vsm/           > /vsmserver/     
> /HA/            /profiles/      /shadowing/     /utils/         /vsmagent/      > /webaccess/   

Note that /tlwebadm is still missing, but that's because of bug 8344. When running as root, it shows up.
Comment 18 Linn cendio 2025-04-04 10:43:08 CEST
Tested server build 3979 on Ubuntu 24.04 and CentOS 8. 

> MUST
> * No folders should be missing when tab completing with tl-config
All folders are now included, and tab completing "tl-config -a /" now has the same output as when running the command. 

As mentioned, /tlwebadm only shows up when tab completing as root. Note that to get the tab completion working for root on Ubuntu 24.04, I had to edit /root/.bashrc and uncomment the following lines:
> #if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
> #    . /etc/bash_completion
> #fi
---

Also looked through the release nots and the commits, looks good.
Comment 19 Linn cendio 2025-04-04 10:55:15 CEST
Output from tab completion on Ubuntu 24.04:
> root@ubuntu2404:/home/cendio# tl-config -a /
> /HA/       /printing/    /sessionstart/  /subclusters/  /utils/   /vsmagent/    /webaccess/     
> /agents/   /profiles/    /shadowing/     /tlwebadm/     /vsm/     /vsmserver/

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