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

[SR-7053] Fix zsh completion script #1514

Merged
merged 3 commits into from
Mar 3, 2018
Merged

Conversation

mzp
Copy link
Contributor

@mzp mzp commented Mar 3, 2018

Solved SR-7053 by adding escaping [ and ].

Before:

$ swift build
$ ./.build/debug/swift-package completion-tool generate-zsh-script>/usr/local/share/zsh/site-functions/_swift
$ zsh
$ swift package --[TAB]
_arguments:comparguments:319: invalid option definition: --enable-build-manifest-caching[Enable llbuild manifest caching [Experimental]]

After:

$ swift build
$ ./.build/debug/swift-package completion-tool generate-zsh-script>/usr/local/share/zsh/site-functions/_swift
$ zsh
$ swift package --[TAB]
option
--build-path                                                        # Specify build/cache directory                                         
--configuration                                                     # Build with configuration (debug|release)                              
--disable-prefetching            --destination  --version  --chdir  #                                                                       
--disable-sandbox                                                   # Disable using the sandbox when executing subprocesses                 
--enable-build-manifest-caching                                     # Enable llbuild manifest caching [Experimental]                        
--no-static-swift-stdlib                                            # Do not link Swift stdlib statically                                   
--package-path                                                      # Change working directory before any other operation                   
--skip-update                                                       # Skip updating dependencies from their remote during a resolution      
--static-swift-stdlib                                               # Link Swift stdlib statically                                          
--verbose                                                           # Increase verbosity of informational output    

@@ -47,7 +47,7 @@ class ArgumentParserTests: XCTestCase {
let parser = ArgumentParser(commandName:"SomeBinary", usage: "sample parser", overview: "Sample overview")

let package = parser.add(positional: "package name of the year", kind: String.self, usage: "The name of the package")
let revision = parser.add(option: "--revision", kind: String.self, usage: "The revision")
let revision = parser.add(option: "--revision", kind: String.self, usage: "The revision[Experimental]")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be reverted as it is not experimental :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, its mistake.



Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove these whitespace diffs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops , I remove it.

Copy link
Contributor

@aciidgh aciidgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, this looks good! I requested some minor changes.

@mzp
Copy link
Contributor Author

mzp commented Mar 3, 2018

Thanks for quickly response. I fixed it.

@aciidgh
Copy link
Contributor

aciidgh commented Mar 3, 2018

@swift-ci please smoke test

@giginet
Copy link
Contributor

giginet commented Mar 3, 2018

👏

@nafu
Copy link

nafu commented Mar 3, 2018

🚀

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.

4 participants