Skip to content

Fix #5046 compatible with MacOS - #5406

Merged
bacongobbler merged 1 commit into
helm:masterfrom
VilledeMontreal:fix/zshCompletionMaxOS
Mar 5, 2019
Merged

bacongobbler merged 1 commit into
helm:masterfrom
VilledeMontreal:fix/zshCompletionMaxOS

Conversation

@marckhouzam

Copy link
Copy Markdown
Member

Signed-off-by: Marc Khouzam [email protected]

What this PR does / why we need it:

Fix issue #5046 for MacOS.

The sed tool on MacOS does not support the use of \w. This PR uses a more portable syntax to convert bash completion to zsh completions.

Different regex could have been used, but I tried to mimic what the original \w\+ aimed to do, which was to match one or more characters. Granted, . matches more things than \w, but I don't believe it is necessary to be that strict in the matching rule.

I've tested the syntax on my mac and on alpine linux in docker.
I've also built helm with the change on my mac and confirmed that it fixes the zsh completion.

@helm-bot helm-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 5, 2019
@bacongobbler

Copy link
Copy Markdown
Member

@kalinon would you have the time available to test this? It appears that you also identified this issue in #5072 (comment).

@kalinon

kalinon commented Mar 5, 2019

Copy link
Copy Markdown

@kalinon would you have the time available to test this? It appears that you also identified this issue in #5072 (comment).

Ill give it a whirl.

@kalinon

kalinon commented Mar 5, 2019

Copy link
Copy Markdown

Confirmed this works!

@bacongobbler

Copy link
Copy Markdown
Member

Thanks @kalinon!

@bacongobbler bacongobbler added this to the 2.14.0 milestone Mar 5, 2019
@bacongobbler
bacongobbler merged commit c94c009 into helm:master Mar 5, 2019
@marckhouzam
marckhouzam deleted the fix/zshCompletionMaxOS branch March 6, 2019 00:26
@marckhouzam

Copy link
Copy Markdown
Member Author

Thanks for the quick turnaround!

@jrpedrianes

Copy link
Copy Markdown

@bacongobbler

Copy link
Copy Markdown
Member

This could be interpreted as a patch, yes. I'll add it to the milestone for cherry-picking into 2.13.1.

@bacongobbler bacongobbler modified the milestones: 2.14.0, 2.13.1 Mar 7, 2019
@bacongobbler bacongobbler added the needs-pick Indicates that a PR needs to be cherry-picked into the next release candidate. label Mar 7, 2019
adamreese pushed a commit to adamreese/helm that referenced this pull request Mar 7, 2019
Signed-off-by: Marc Khouzam <[email protected]>
(cherry picked from commit c94c009)
adamreese pushed a commit to adamreese/helm that referenced this pull request Mar 7, 2019
Signed-off-by: Marc Khouzam <[email protected]>
(cherry picked from commit c94c009)
bacongobbler pushed a commit that referenced this pull request Mar 21, 2019
(cherry picked from commit c94c009)

Signed-off-by: Marc Khouzam <[email protected]>
@bacongobbler bacongobbler added picked Indicates that a PR has been cherry-picked into the next release candidate. and removed needs-pick Indicates that a PR needs to be cherry-picked into the next release candidate. labels Mar 21, 2019
marckhouzam added a commit to VilledeMontreal/helm that referenced this pull request May 20, 2019
PR helm#5072 followed by helm#5406 tweaked the handling of the associative
array 'aliashash' when in zsh.  However, upon further investigation
the root of the problem was the 'aliashash' was not being declared
properly as it was declared within a method and therefore not
accessible to the rest of the completion script.

The previous commit of this PR makes the necessary change to properly
declare 'aliashash' which makes the previous tweak unecessary.  This
commit removes the tweak.

Signed-off-by: Marc Khouzam <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

picked Indicates that a PR has been cherry-picked into the next release candidate. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants