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

Add flags_completion as without @ format to _filedir #103

Closed
wants to merge 1 commit into from
Closed

Add flags_completion as without @ format to _filedir #103

wants to merge 1 commit into from

Conversation

nak3
Copy link
Contributor

@nak3 nak3 commented May 4, 2015

In my environment, filename extentionsf for flags doesn't work.

It seems that the format _filedir @(json|yaml|yml) doesn't work, but _filedir 'json|yaml|yml' works. I tested [1] with replacing as below.

#${flags_completion[${index}]}
_filedir "json|yaml|yml"

It may be my environment issue, but I hope if you could check it.

[1] https://github.com/GoogleCloudPlatform/kubernetes/blob/72f9e940a863878569571623669ef4a4add18cc2/contrib/completions/bash/kubectl#L54

@eparis
Copy link
Collaborator

eparis commented May 4, 2015

so I see it doesn't work. you're right. I'm looking for the 'best' way to fix it....

eparis added a commit to eparis/cobra that referenced this pull request May 4, 2015
We were trying to call a bash function with bash stuff like @ () from a
variable.  Stop that.  Just call a function with an arg from a variable
instead of trying to pass around the bash.

Should fix spf13#103
@eparis
Copy link
Collaborator

eparis commented May 4, 2015

what do you think of #105 ?

eparis added a commit to eparis/cobra that referenced this pull request May 4, 2015
We were trying to call a bash function with bash stuff like @ () from a
variable.  Stop that.  Just call a function with an arg from a variable
instead of trying to pass around the bash.

Should fix spf13#103
@nak3
Copy link
Contributor Author

nak3 commented May 5, 2015

@eparis Thank you so much. I understand. #105 looks good. Please marge it and close here.

@eparis eparis closed this May 5, 2015
muscliary added a commit to muscliary/cobra that referenced this pull request Sep 12, 2023
We were trying to call a bash function with bash stuff like @ () from a
variable.  Stop that.  Just call a function with an arg from a variable
instead of trying to pass around the bash.

Should fix spf13/cobra#103
desdeel2d0m added a commit to desdeel2d0m/cobra that referenced this pull request Jul 1, 2024
We were trying to call a bash function with bash stuff like @ () from a
variable.  Stop that.  Just call a function with an arg from a variable
instead of trying to pass around the bash.

Should fix spf13/cobra#103
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.

None yet

2 participants