Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RRFC] Decompose bash completions #756

Open
dysbulic opened this issue Jan 30, 2024 · 0 comments
Open

[RRFC] Decompose bash completions #756

dysbulic opened this issue Jan 30, 2024 · 0 comments

Comments

@dysbulic
Copy link

dysbulic commented Jan 30, 2024

Motivation ("The Why")

The result of running npm completion is a monolithic function for the entirety of the npm command. Contrast this with git which allows a definition like:

alias gp='git push'
__git_complete gp _git_push

How

Current Behaviour

The current npm completion only works for the base command.

Desired Behaviour

I could define:

alias nr='npm run'
__npm_complete nr _npm_run

And when I double tab after nr it would show me the available tasks (the behavior when double tabbing after npm run when completions are loaded) rather than listing the files in the current directory.

References

@dysbulic dysbulic changed the title [RRFC] <title> [RRFC] Decompose bash completions Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant