diff options
| author | Raul Ferreira <raulmendesferreira@gmail.com> | 2018-10-07 22:33:29 +0100 | 
|---|---|---|
| committer | Marc Cornellà <marc.cornella@live.com> | 2018-10-07 23:33:29 +0200 | 
| commit | 7b29684a3087c881f240ebb74bd387c69f0ffcc6 (patch) | |
| tree | 99902fff8fd978043498c7038576952f0b7f4a8f /plugins/swiftpm | |
| parent | 6b7c0805f07a9ca3a2391b46aae80f069224fa17 (diff) | |
| download | zsh-7b29684a3087c881f240ebb74bd387c69f0ffcc6.tar.gz zsh-7b29684a3087c881f240ebb74bd387c69f0ffcc6.tar.bz2 zsh-7b29684a3087c881f240ebb74bd387c69f0ffcc6.zip | |
swiftpm: update swift completion script (#7243)
Diffstat (limited to 'plugins/swiftpm')
| -rw-r--r-- | plugins/swiftpm/_swift | 147 | 
1 files changed, 79 insertions, 68 deletions
| diff --git a/plugins/swiftpm/_swift b/plugins/swiftpm/_swift index 901b5d9e2..bed6e13a7 100644 --- a/plugins/swiftpm/_swift +++ b/plugins/swiftpm/_swift @@ -72,14 +72,16 @@ _swift_build() {          "--build-path[Specify build/cache directory ]:Specify build/cache directory :_files"          "(--chdir -C)"{--chdir,-C}"[]: :_files"          "--package-path[Change working directory before any other operation]:Change working directory before any other operation:_files" +        "--sanitize[Turn on runtime checks for erroneous behavior]: :{_values '' 'address[enable Address sanitizer]' 'thread[enable Thread sanitizer]'}"          "--disable-prefetching[]" +        "--skip-update[Skip updating dependencies from their remote during a resolution]"          "--disable-sandbox[Disable using the sandbox when executing subprocesses]"          "--version[]"          "--destination[]: :_files"          "(--verbose -v)"{--verbose,-v}"[Increase verbosity of informational output]" -        "--no-static-swift-stdlib[Do not link Swift stdlib statically]" +        "--no-static-swift-stdlib[Do not link Swift stdlib statically \[default\]]"          "--static-swift-stdlib[Link Swift stdlib statically]" -        "--enable-build-manifest-caching[Enable llbuild manifest caching [Experimental]]" +        "--enable-build-manifest-caching[Enable llbuild manifest caching \[Experimental\]]"          "--build-tests[Build both source and test targets]"          "--product[Build the specified product]:Build the specified product: "          "--target[Build the specified target]:Build the specified target: " @@ -106,14 +108,16 @@ _swift_run() {          "--build-path[Specify build/cache directory ]:Specify build/cache directory :_files"          "(--chdir -C)"{--chdir,-C}"[]: :_files"          "--package-path[Change working directory before any other operation]:Change working directory before any other operation:_files" +        "--sanitize[Turn on runtime checks for erroneous behavior]: :{_values '' 'address[enable Address sanitizer]' 'thread[enable Thread sanitizer]'}"          "--disable-prefetching[]" +        "--skip-update[Skip updating dependencies from their remote during a resolution]"          "--disable-sandbox[Disable using the sandbox when executing subprocesses]"          "--version[]"          "--destination[]: :_files"          "(--verbose -v)"{--verbose,-v}"[Increase verbosity of informational output]" -        "--no-static-swift-stdlib[Do not link Swift stdlib statically]" +        "--no-static-swift-stdlib[Do not link Swift stdlib statically \[default\]]"          "--static-swift-stdlib[Link Swift stdlib statically]" -        "--enable-build-manifest-caching[Enable llbuild manifest caching [Experimental]]" +        "--enable-build-manifest-caching[Enable llbuild manifest caching \[Experimental\]]"          "--skip-build[Skip building the executable product]"      )      _arguments $arguments && return @@ -136,14 +140,16 @@ _swift_package() {          "--build-path[Specify build/cache directory ]:Specify build/cache directory :_files"          "(--chdir -C)"{--chdir,-C}"[]: :_files"          "--package-path[Change working directory before any other operation]:Change working directory before any other operation:_files" +        "--sanitize[Turn on runtime checks for erroneous behavior]: :{_values '' 'address[enable Address sanitizer]' 'thread[enable Thread sanitizer]'}"          "--disable-prefetching[]" +        "--skip-update[Skip updating dependencies from their remote during a resolution]"          "--disable-sandbox[Disable using the sandbox when executing subprocesses]"          "--version[]"          "--destination[]: :_files"          "(--verbose -v)"{--verbose,-v}"[Increase verbosity of informational output]" -        "--no-static-swift-stdlib[Do not link Swift stdlib statically]" +        "--no-static-swift-stdlib[Do not link Swift stdlib statically \[default\]]"          "--static-swift-stdlib[Link Swift stdlib statically]" -        "--enable-build-manifest-caching[Enable llbuild manifest caching [Experimental]]" +        "--enable-build-manifest-caching[Enable llbuild manifest caching \[Experimental\]]"          '(-): :->command'          '(-)*:: :->arg'      ) @@ -152,135 +158,133 @@ _swift_package() {          (command)              local modes              modes=( +                'edit:Put a package in editable mode' +                'clean:Delete build artifacts' +                'init:Initialize a new package' +                'dump-package:Print parsed Package.swift as JSON' +                'describe:Describe the current package' +                'unedit:Remove a package from editable mode'                  'update:Update package dependencies' -                'show-dependencies:Print the resolved dependency graph' -                'resolve:Resolve package dependencies' -                'fetch:'                  'completion-tool:Completion tool (for shell completions)' -                'edit:Put a package in editable mode'                  'tools-version:Manipulate tools version of the current package' -                'describe:Describe the current package' -                'clean:Delete build artifacts'                  'reset:Reset the complete cache/build directory' -                'unedit:Remove a package from editable mode' +                'resolve:Resolve package dependencies'                  'generate-xcodeproj:Generates an Xcode project' -                'init:Initialize a new package' -                'dump-package:Print parsed Package.swift as JSON' +                'fetch:' +                'show-dependencies:Print the resolved dependency graph'              )              _describe "mode" modes              ;;          (arg)              case ${words[1]} in -                (update) -                    _swift_package_update +                (edit) +                    _swift_package_edit                      ;; -                (show-dependencies) -                    _swift_package_show-dependencies +                (clean) +                    _swift_package_clean                      ;; -                (resolve) -                    _swift_package_resolve +                (init) +                    _swift_package_init                      ;; -                (fetch) -                    _swift_package_fetch +                (dump-package) +                    _swift_package_dump-package +                    ;; +                (describe) +                    _swift_package_describe +                    ;; +                (unedit) +                    _swift_package_unedit +                    ;; +                (update) +                    _swift_package_update                      ;;                  (completion-tool)                      _swift_package_completion-tool                      ;; -                (edit) -                    _swift_package_edit -                    ;;                  (tools-version)                      _swift_package_tools-version                      ;; -                (describe) -                    _swift_package_describe -                    ;; -                (clean) -                    _swift_package_clean -                    ;;                  (reset)                      _swift_package_reset                      ;; -                (unedit) -                    _swift_package_unedit +                (resolve) +                    _swift_package_resolve                      ;;                  (generate-xcodeproj)                      _swift_package_generate-xcodeproj                      ;; -                (init) -                    _swift_package_init +                (fetch) +                    _swift_package_fetch                      ;; -                (dump-package) -                    _swift_package_dump-package +                (show-dependencies) +                    _swift_package_show-dependencies                      ;;              esac              ;;      esac  } -_swift_package_update() { +_swift_package_edit() {      arguments=( +        ":The name of the package to edit:_swift_dependency" +        "--revision[The revision to edit]:The revision to edit: " +        "--branch[The branch to create]:The branch to create: " +        "--path[Create or use the checkout at this path]:Create or use the checkout at this path:_files"      )      _arguments $arguments && return  } -_swift_package_show-dependencies() { +_swift_package_clean() {      arguments=( -        "--format[text|dot|json|flatlist]: :{_values '' 'text[list dependencies using text format]' 'dot[list dependencies using dot format]' 'json[list dependencies using JSON format]'}"      )      _arguments $arguments && return  } -_swift_package_resolve() { +_swift_package_init() {      arguments=( -        ":The name of the package to resolve:_swift_dependency" -        "--version[The version to resolve at]:The version to resolve at: " -        "--branch[The branch to resolve at]:The branch to resolve at: " -        "--revision[The revision to resolve at]:The revision to resolve at: " +        "--type[empty|library|executable|system-module]: :{_values '' 'empty[generates an empty project]' 'library[generates project for a dynamic library]' 'executable[generates a project for a cli executable]' 'system-module[generates a project for a system module]'}"      )      _arguments $arguments && return  } -_swift_package_fetch() { +_swift_package_dump-package() {      arguments=(      )      _arguments $arguments && return  } -_swift_package_completion-tool() { +_swift_package_describe() {      arguments=( -        ": :{_values '' 'generate-bash-script[generate Bash completion script]' 'generate-zsh-script[generate Bash completion script]' 'list-dependencies[list all dependencies' names]' 'list-executables[list all executables' names]'}" +        "--type[json|text]: :{_values '' 'text[describe using text format]' 'json[describe using JSON format]'}"      )      _arguments $arguments && return  } -_swift_package_edit() { +_swift_package_unedit() {      arguments=( -        ":The name of the package to edit:_swift_dependency" -        "--revision[The revision to edit]:The revision to edit: " -        "--branch[The branch to create]:The branch to create: " -        "--path[Create or use the checkout at this path]:Create or use the checkout at this path:_files" +        ":The name of the package to unedit:_swift_dependency" +        "--force[Unedit the package even if it has uncommited and unpushed changes.]"      )      _arguments $arguments && return  } -_swift_package_tools-version() { +_swift_package_update() {      arguments=( -        "--set[Set tools version of package to the given value]:Set tools version of package to the given value: " -        "--set-current[Set tools version of package to the current tools version in use]"      )      _arguments $arguments && return  } -_swift_package_describe() { +_swift_package_completion-tool() {      arguments=( -        "--type[json|text]: :{_values '' 'text[describe using text format]' 'json[describe using JSON format]'}" +        ": :{_values '' 'generate-bash-script[generate Bash completion script]' 'generate-zsh-script[generate Bash completion script]' 'list-dependencies[list all dependencies' names]' 'list-executables[list all executables' names]'}"      )      _arguments $arguments && return  } -_swift_package_clean() { +_swift_package_tools-version() {      arguments=( +        "--set[Set tools version of package to the given value]:Set tools version of package to the given value: " +        "--set-current[Set tools version of package to the current tools version in use]"      )      _arguments $arguments && return  } @@ -291,10 +295,12 @@ _swift_package_reset() {      _arguments $arguments && return  } -_swift_package_unedit() { +_swift_package_resolve() {      arguments=( -        ":The name of the package to unedit:_swift_dependency" -        "--force[Unedit the package even if it has uncommited and unpushed changes.]" +        ":The name of the package to resolve:_swift_dependency" +        "--version[The version to resolve at]:The version to resolve at: " +        "--branch[The branch to resolve at]:The branch to resolve at: " +        "--revision[The revision to resolve at]:The revision to resolve at: "      )      _arguments $arguments && return  } @@ -304,19 +310,21 @@ _swift_package_generate-xcodeproj() {          "--xcconfig-overrides[Path to xcconfig file]:Path to xcconfig file:_files"          "--enable-code-coverage[Enable code coverage in the generated project]"          "--output[Path where the Xcode project should be generated]:Path where the Xcode project should be generated:_files" +        "--legacy-scheme-generator[Use the legacy scheme generator]" +        "--watch[Watch for changes to the Package manifest to regenerate the Xcode project]"      )      _arguments $arguments && return  } -_swift_package_init() { +_swift_package_fetch() {      arguments=( -        "--type[empty|library|executable|system-module]: :{_values '' 'empty[generates an empty project]' 'library[generates project for a dynamic library]' 'executable[generates a project for a cli executable]' 'system-module[generates a project for a system module]'}"      )      _arguments $arguments && return  } -_swift_package_dump-package() { +_swift_package_show-dependencies() {      arguments=( +        "--format[text|dot|json|flatlist]: :{_values '' 'text[list dependencies using text format]' 'dot[list dependencies using dot format]' 'json[list dependencies using JSON format]'}"      )      _arguments $arguments && return  } @@ -338,19 +346,22 @@ _swift_test() {          "--build-path[Specify build/cache directory ]:Specify build/cache directory :_files"          "(--chdir -C)"{--chdir,-C}"[]: :_files"          "--package-path[Change working directory before any other operation]:Change working directory before any other operation:_files" +        "--sanitize[Turn on runtime checks for erroneous behavior]: :{_values '' 'address[enable Address sanitizer]' 'thread[enable Thread sanitizer]'}"          "--disable-prefetching[]" +        "--skip-update[Skip updating dependencies from their remote during a resolution]"          "--disable-sandbox[Disable using the sandbox when executing subprocesses]"          "--version[]"          "--destination[]: :_files"          "(--verbose -v)"{--verbose,-v}"[Increase verbosity of informational output]" -        "--no-static-swift-stdlib[Do not link Swift stdlib statically]" +        "--no-static-swift-stdlib[Do not link Swift stdlib statically \[default\]]"          "--static-swift-stdlib[Link Swift stdlib statically]" -        "--enable-build-manifest-caching[Enable llbuild manifest caching [Experimental]]" +        "--enable-build-manifest-caching[Enable llbuild manifest caching \[Experimental\]]"          "--skip-build[Skip building the test target]"          "(--list-tests -l)"{--list-tests,-l}"[Lists test methods in specifier format]"          "--generate-linuxmain[Generate LinuxMain.swift entries for the package]"          "--parallel[Run the tests in parallel.]"          "(--specifier -s)"{--specifier,-s}"[]: : " +        "--xunit-output[]: :_files"          "--filter[Run test cases matching regular expression, Format: <test-target>.<test-case> or <test-target>.<test-case>/<test>]:Run test cases matching regular expression, Format: <test-target>.<test-case> or <test-target>.<test-case>/<test>: "      )      _arguments $arguments && return | 
