vmware / vmware/photon

Unable to autocomplete commands when I use the sudo command

Open
#1,348 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

4.0 bug tdnf
Dominant language
C
Stars
3.2k
Forks
692
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

Unable to autocomplete commands when I use the sudo command, such as

sudo tdnf ...

and so on. I can not find out the solutions.

Reproduction steps
1. add a new user.
2. add the new user to the sudo list.
3. switch to the new user's account.
4. can not use the bash_completion and the root account also can not use the sudo autocomplete.
Expected behavior

when I use the sudo command, I can use TAB to auto complete the command.

Additional context

OS version: PhotonOS 4.0 Rev2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the problem using the listed steps on PhotonOS 4.0 Rev2, then inspect how sudo invokes bash_completion for the tdnf command. Confirm the behavior for both the new user and root, and consider the issue done when TAB completion works for sudo commands in both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, linux
Domain
cli, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.