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

Completion: Add make variables with values #121

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mstaz
Copy link

@mstaz mstaz commented Aug 13, 2024

So far only variable names were added. However Makefiles and make would also return possible values which are not completed so far. The values are stored and overwritten in the map without using them anywhere. So instead it currently makes more sense to complete the whole variable name-value combination instead of only the name.

I'm unsure about this change because I have not completely understood zsh's completion system yet. However it works for me (version 5.8 and call-command set true) as I want it to be. It's similar to bash's behavior with that.

So far only variable names were added. However Makefiles and make would
also return possible values which are not completed so far. The values
are stored and overwritten in the map without using them anywhere.
So instead it currently makes more sense to complete the whole variable
name-value combination instead of only the name.
@larryv
Copy link
Contributor

larryv commented Aug 13, 2024

This contribution should probably be discussed on the mailing list, since it significantly changes completion behavior. Very few committers monitor this repository mirror, and little to no discussion happens here.

@mstaz
Copy link
Author

mstaz commented Jan 6, 2025

Thanks for the advice. I followed zsh-completions/CONTRIBUTING.md which states that completion functions can be contributed via github pr as well. But maybe you are right.

@okdana
Copy link
Contributor

okdana commented Jan 6, 2025

we do accept completion contributions via pr, it's just that in this case it would be a controversial change

i don't find it desirable at all to complete the entire variable=value pair and i doubt others will either. it makes it very annoying in the most common case where you just want to assign your own value

what we could do instead is offer values parsed out of the file as possibilities if you complete like VAR=<TAB>. i didn't study it closely but as you mentioned the ground-work for this already exists in the function, it just isn't exposed. that would be inoffensive imo

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

Successfully merging this pull request may close these issues.

3 participants