Skip to content

Auto Completion with DNF Packages #12743

Answered by Jan9103
Tahinli asked this question in Q&A
Discussion options

You must be logged in to vote

in nushell you have to write completions for external programs yourself (or copy someone elses solution).
it seems as if noone has published a usable one for dnf yet (only this).

i have never used dnf, but to give you an idea how it could roughly look in your configuration heres is a guess:

def "complete dnf pacakges" [] {
  dnf list --all | lines
}

export extern "dnf install" [
  --yes(-y)  # accept all prompts
  ...packages: string@"complete dnf packages"
]

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Tahinli
Comment options

Answer selected by Tahinli
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants