Skip to content

Conversation

@TechDufus
Copy link

This PR closes #379

Since aliases are sourced before completions, we can check for the existence of the alias at this point and conditionally load completion for it here.

@akinomyoga
Copy link
Contributor

Do we need this? If the user would like to reflect the completion settings also to the corresponding aliases, the official way is to set progcomp_alias:

shopt -s progcomp_alias

@TechDufus
Copy link
Author

I think you're right.. I'm just having this setting clash with complete -D which is why I'm having issues... This can probably just be dropped...

@akinomyoga
Copy link
Contributor

Thank you for your reply. I now see the problem. I guess this should be fixed at the side of Bash or the default completion function of complete -D -F func.

I checked the mailing list of Bash and found a thread [1] where the discussion seemed to have stopped in the middle, and the change did not happen. I also checked the implementation of bash-completion's __load_completion [2] (which is used by bash-completion's default completion), but it doesn't seem to handle the aliases. There is actually a Bash configuration cykerway/complete-alias [3] to handle aliases, and it is suggested to merge it into bash-completion [4], which haven't yet happened actually. On the other hand, progcomp_alias has a higher priority than the default completion of complete -D in ble.sh [5],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing terraform completions an t alias for terraform

2 participants