40df67bc3b9b51caa24df5d220487043040d1f9a

Author
Tim <0xTim@users.noreply.github.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

swiftpm: update completion for Swift 5.1 (#8248)

Diff

This diff is truncated to protect this page.

  1diff --git a/plugins/swiftpm/README.md b/plugins/swiftpm/README.md
  2index 2914585113f1cdb1c10de79046321308843d4d7b..a722c03e4ff7a6cfa4c363a1a823c7b4e4f73166 100644
  3--- a/plugins/swiftpm/README.md
  4+++ b/plugins/swiftpm/README.md
  5@@ -2,7 +2,7 @@
  6 
  7 ## Description
  8 
  9-This plugin provides a few utilities that make you faster on your daily work with the [Swift Package Manager](https://github.com/apple/swift-package-manager), as well as autocompletion for Swift 5.0.
 10+This plugin provides a few utilities that make you faster on your daily work with the [Swift Package Manager](https://github.com/apple/swift-package-manager), as well as autocompletion for Swift 5.1.
 11 
 12 To start using it, add the `swiftpm` plugin to your `plugins` array in `~/.zshrc`:
 13 
 14diff --git a/plugins/swiftpm/_swift b/plugins/swiftpm/_swift
 15index 1366b4d9ce7e0f48ab9fe434f9da6d8380a44d00..fe6f1c9aa99a8acb147454ab2a5dadc7ecf4a4a8 100644
 16--- a/plugins/swiftpm/_swift
 17+++ b/plugins/swiftpm/_swift
 18@@ -82,13 +82,15 @@ _swift_build() {
 19         "(--verbose -v)"{--verbose,-v}"[Increase verbosity of informational output]"
 20         "--no-static-swift-stdlib[Do not link Swift stdlib statically \[default\]]"
 21         "--static-swift-stdlib[Link Swift stdlib statically]"
 22-        "--enable-llbuild-library[Enable building with the llbuild library]"
 23         "--force-resolved-versions[]"
 24         "--disable-automatic-resolution[Disable automatic resolution if Package.resolved file is out-of-date]"
 25         "--enable-index-store[Enable indexing-while-building feature]"
 26         "--disable-index-store[Disable indexing-while-building feature]"
 27         "--enable-pubgrub-resolver[\[Experimental\] Enable the new Pubgrub dependency resolver]"
 28         "--enable-parseable-module-interfaces[]"
 29+        "--trace-resolver[]"
 30+        "(--jobs -j)"{--jobs,-j}"[The number of jobs to spawn in parallel during the build process]:The number of jobs to spawn in parallel during the build process: "
 31+        "--enable-test-discovery[Enable test discovery on platforms without Objective-C runtime]"
 32         "--build-tests[Build both source and test targets]"
 33         "--product[Build the specified product]:Build the specified product: "
 34         "--target[Build the specified target]:Build the specified target: "
 35@@ -125,13 +127,15 @@ _swift_run() {
 36         "(--verbose -v)"{--verbose,-v}"[Increase verbosity of informational output]"
 37         "--no-static-swift-stdlib[Do not link Swift stdlib statically \[default\]]"
 38         "--static-swift-stdlib[Link Swift stdlib statically]"
 39-        "--enable-llbuild-library[Enable building with the llbuild library]"
 40         "--force-resolved-versions[]"
 41         "--disable-automatic-resolution[Disable automatic resolution if Package.resolved file is out-of-date]"
 42         "--enable-index-store[Enable indexing-while-building feature]"
 43         "--disable-index-store[Disable indexing-while-building feature]"
 44         "--enable-pubgrub-resolver[\[Experimental\] Enable the new Pubgrub dependency resolver]"
 45         "--enable-parseable-module-interfaces[]"
 46+        "--trace-resolver[]"
 47+        "(--jobs -j)"{--jobs,-j}"[The number of jobs to spawn in parallel during the build process]:The number of jobs to spawn in parallel during the build process: "
 48+        "--enable-test-discovery[Enable test discovery on platforms without Objective-C runtime]"
 49         "--skip-build[Skip building the executable product]"
 50         "--build-tests[Build both source and test targets]"
 51         "--repl[Launch Swift REPL for the package]"
 52@@ -166,13 +170,15 @@ _swift_package() {
 53         "(--verbose -v)"{--verbose,-v}"[Increase verbosity of informational output]"
 54         "--no-static-swift-stdlib[Do not link Swift stdlib statically \[default\]]"
 55         "--static-swift-stdlib[Link Swift stdlib statically]"
 56-        "--enable-llbuild-library[Enable building with the llbuild library]"
 57         "--force-resolved-versions[]"
 58         "--disable-automatic-resolution[Disable automatic resolution if Package.resolved file is out-of-date]"
 59         "--enable-index-store[Enable indexing-while-building feature]"
 60         "--disable-index-store[Disable indexing-while-building feature]"
 61         "--enable-pubgrub-resolver[\[Experimental\] Enable the new Pubgrub dependency resolver]"
 62         "--enable-parseable-module-interfaces[]"
 63+        "--trace-resolver[]"
 64+        "(--jobs -j)"{--jobs,-j}"[The number of jobs to spawn in parallel during the build process]:The number of jobs to spawn in parallel during the build process: "
 65+        "--enable-test-discovery[Enable test discovery on platforms without Objective-C runtime]"
 66         '(-): :->command'
 67         '(-)*:: :->arg'
 68     )
 69@@ -181,49 +187,61 @@ _swift_package() {
 70         (command)
 71             local modes
 72             modes=(
 73-                'update:Update package dependencies'
 74+                'completion-tool:Completion tool (for shell completions)'
 75+                'dump-package:Print parsed Package.swift as JSON'
 76                 'describe:Describe the current package'
 77-                'resolve:Resolve package dependencies'
 78-                'tools-version:Manipulate tools version of the current package'
 79-                'unedit:Remove a package from editable mode'
 80+                'clean:Delete build artifacts'
 81                 'show-dependencies:Print the resolved dependency graph'
 82+                'init:Initialize a new package'
 83+                'unedit:Remove a package from editable mode'
 84+                'tools-version:Manipulate tools version of the current package'
 85                 'fetch:'
 86-                'dump-package:Print parsed Package.swift as JSON'
 87+                'resolve:Resolve package dependencies'
 88+                'reset:Reset the complete cache/build directory'
 89+                'generate-xcodeproj:Generates an Xcode project'
 90                 'edit:Put a package in editable mode'
 91                 'config:Manipulate configuration of the package'
 92-                'completion-tool:Completion tool (for shell completions)'
 93-                'clean:Delete build artifacts'
 94-                'generate-xcodeproj:Generates an Xcode project'
 95-                'reset:Reset the complete cache/build directory'
 96-                'init:Initialize a new package'
 97+                'update:Update package dependencies'
 98             )
 99             _describe "mode" modes
100             ;;
101         (arg)
102             case ${words[1]} in
103-                (update)
104-                    _swift_package_update
105+                (completion-tool)
106+                    _swift_package_completion-tool
107+                    ;;
108+                (dump-package)
109+                    _swift_package_dump-package
110                     ;;
111                 (describe)
112                     _swift_package_describe
113                     ;;
114-                (resolve)
115-                    _swift_package_resolve
116+                (clean)
117+                    _swift_package_clean