-
Notifications
You must be signed in to change notification settings - Fork 68
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
Difficulty with complete -C
commands
#30
Comments
Is there a minimum working example? I mean, something that can be reproduced exactly? At least tell me if you are on Linux or Mac, bash version, and show me the output of |
Sorry, it didn't occur to me to tell you my OS. :P I'm on MacOS.
If you think it would be helpful I could try to create a Thanks for a cool utility! |
Several points:
|
Prompted by your comment I simplified to:
...and reran
Additionally I tried moving the |
|
Run this container and try to complete |
First of all, I need some minor modifications to successfully reproduce the bug:
Now tab-complete However, I don't think this is an alias problem. To see why, you can try this
Now tab-complete
There seems to be some problem when using |
Furthermore, Instead, I can give you a simpler example if you decide to report the bug upstream:
gives the error:
|
complete -C
commands
I don't think this has anything to do with symlinks. I think the problem happens because of |
Thanks for the in-depth analysis! A question: were you able to determine that |
I don't know if BTW, I shall create the upstream issue for you. Created as scop/bash-completion#631. |
Was just about to go create it but wanted to look like I had some idea what I was talking about ;) . Thanks again. |
I had a similar issue when I tried to alias
In your case, it's a little more complicated:
The key is to trick |
I use certain utility packages to manage multiple versions of a given utility. One such is
tfenv
to manage Terraform. This sets up myPATH
such that the executable file namedterraform
is symlinked to a script that invokes the appropriate actual instance. Command completion works without issue. I would like to set up an alias, e.g.:alias tfinit='terraform init ... $@'
but I find that this gives me errors like:
-bash: compgen: warning: -C option may not work as you expect
Is this possible? What can I do to help complete-alias DWIM?
Thanks,
Matt
The text was updated successfully, but these errors were encountered: