f12f7b03413c8468adda8adf817e155e3d17f1b4
- Author
- Marc Cornellà <marc.cornella@live.com>
- Committer
- GitHub <noreply@github.com>
- Date
Message
Diff
This diff is truncated to protect this page.
1diff --git a/plugins/swiftpm/README.md b/plugins/swiftpm/README.md
2index 07ca25651150a40aa84ad07e1f9b1fd3aae43b92..2914585113f1cdb1c10de79046321308843d4d7b 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).
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.0.
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 bed6e13a76f8c05c02e4ba5a2eaf4900032382a1..1366b4d9ce7e0f48ab9fe434f9da6d8380a44d00 100644
16--- a/plugins/swiftpm/_swift
17+++ b/plugins/swiftpm/_swift
18@@ -72,16 +72,23 @@ _swift_build() {
19 "--build-path[Specify build/cache directory ]:Specify build/cache directory :_files"
20 "(--chdir -C)"{--chdir,-C}"[]: :_files"
21 "--package-path[Change working directory before any other operation]:Change working directory before any other operation:_files"
22- "--sanitize[Turn on runtime checks for erroneous behavior]: :{_values '' 'address[enable Address sanitizer]' 'thread[enable Thread sanitizer]'}"
23+ "--sanitize[Turn on runtime checks for erroneous behavior]: :{_values '' 'address[enable Address sanitizer]' 'thread[enable Thread sanitizer]' 'undefined[enable Undefined Behavior sanitizer]'}"
24 "--disable-prefetching[]"
25 "--skip-update[Skip updating dependencies from their remote during a resolution]"
26 "--disable-sandbox[Disable using the sandbox when executing subprocesses]"
27+ "--disable-package-manifest-caching[Disable caching Package.swift manifests]"
28 "--version[]"
29 "--destination[]: :_files"
30 "(--verbose -v)"{--verbose,-v}"[Increase verbosity of informational output]"
31 "--no-static-swift-stdlib[Do not link Swift stdlib statically \[default\]]"
32 "--static-swift-stdlib[Link Swift stdlib statically]"
33- "--enable-build-manifest-caching[Enable llbuild manifest caching \[Experimental\]]"
34+ "--enable-llbuild-library[Enable building with the llbuild library]"
35+ "--force-resolved-versions[]"
36+ "--disable-automatic-resolution[Disable automatic resolution if Package.resolved file is out-of-date]"
37+ "--enable-index-store[Enable indexing-while-building feature]"
38+ "--disable-index-store[Disable indexing-while-building feature]"
39+ "--enable-pubgrub-resolver[\[Experimental\] Enable the new Pubgrub dependency resolver]"
40+ "--enable-parseable-module-interfaces[]"
41 "--build-tests[Build both source and test targets]"
42 "--product[Build the specified product]:Build the specified product: "
43 "--target[Build the specified target]:Build the specified target: "
44@@ -108,17 +115,26 @@ _swift_run() {
45 "--build-path[Specify build/cache directory ]:Specify build/cache directory :_files"
46 "(--chdir -C)"{--chdir,-C}"[]: :_files"
47 "--package-path[Change working directory before any other operation]:Change working directory before any other operation:_files"
48- "--sanitize[Turn on runtime checks for erroneous behavior]: :{_values '' 'address[enable Address sanitizer]' 'thread[enable Thread sanitizer]'}"
49+ "--sanitize[Turn on runtime checks for erroneous behavior]: :{_values '' 'address[enable Address sanitizer]' 'thread[enable Thread sanitizer]' 'undefined[enable Undefined Behavior sanitizer]'}"
50 "--disable-prefetching[]"
51 "--skip-update[Skip updating dependencies from their remote during a resolution]"
52 "--disable-sandbox[Disable using the sandbox when executing subprocesses]"
53+ "--disable-package-manifest-caching[Disable caching Package.swift manifests]"
54 "--version[]"
55 "--destination[]: :_files"
56 "(--verbose -v)"{--verbose,-v}"[Increase verbosity of informational output]"
57 "--no-static-swift-stdlib[Do not link Swift stdlib statically \[default\]]"
58 "--static-swift-stdlib[Link Swift stdlib statically]"
59- "--enable-build-manifest-caching[Enable llbuild manifest caching \[Experimental\]]"
60+ "--enable-llbuild-library[Enable building with the llbuild library]"
61+ "--force-resolved-versions[]"
62+ "--disable-automatic-resolution[Disable automatic resolution if Package.resolved file is out-of-date]"
63+ "--enable-index-store[Enable indexing-while-building feature]"
64+ "--disable-index-store[Disable indexing-while-building feature]"
65+ "--enable-pubgrub-resolver[\[Experimental\] Enable the new Pubgrub dependency resolver]"
66+ "--enable-parseable-module-interfaces[]"
67 "--skip-build[Skip building the executable product]"
68+ "--build-tests[Build both source and test targets]"
69+ "--repl[Launch Swift REPL for the package]"
70 )
71 _arguments $arguments && return
72 }
73@@ -140,16 +156,23 @@ _swift_package() {
74 "--build-path[Specify build/cache directory ]:Specify build/cache directory :_files"
75 "(--chdir -C)"{--chdir,-C}"[]: :_files"
76 "--package-path[Change working directory before any other operation]:Change working directory before any other operation:_files"
77- "--sanitize[Turn on runtime checks for erroneous behavior]: :{_values '' 'address[enable Address sanitizer]' 'thread[enable Thread sanitizer]'}"
78+ "--sanitize[Turn on runtime checks for erroneous behavior]: :{_values '' 'address[enable Address sanitizer]' 'thread[enable Thread sanitizer]' 'undefined[enable Undefined Behavior sanitizer]'}"
79 "--disable-prefetching[]"
80 "--skip-update[Skip updating dependencies from their remote during a resolution]"
81 "--disable-sandbox[Disable using the sandbox when executing subprocesses]"
82+ "--disable-package-manifest-caching[Disable caching Package.swift manifests]"
83 "--version[]"
84 "--destination[]: :_files"
85 "(--verbose -v)"{--verbose,-v}"[Increase verbosity of informational output]"
86 "--no-static-swift-stdlib[Do not link Swift stdlib statically \[default\]]"
87 "--static-swift-stdlib[Link Swift stdlib statically]"
88- "--enable-build-manifest-caching[Enable llbuild manifest caching \[Experimental\]]"
89+ "--enable-llbuild-library[Enable building with the llbuild library]"
90+ "--force-resolved-versions[]"
91+ "--disable-automatic-resolution[Disable automatic resolution if Package.resolved file is out-of-date]"
92+ "--enable-index-store[Enable indexing-while-building feature]"
93+ "--disable-index-store[Disable indexing-while-building feature]"
94+ "--enable-pubgrub-resolver[\[Experimental\] Enable the new Pubgrub dependency resolver]"
95+ "--enable-parseable-module-interfaces[]"
96 '(-): :->command'
97 '(-)*:: :->arg'
98 )
99@@ -158,91 +181,124 @@ _swift_package() {
100 (command)
101 local modes
102 modes=(
103- 'edit:Put a package in editable mode'
104- 'clean:Delete build artifacts'
105- 'init:Initialize a new package'
106- 'dump-package:Print parsed Package.swift as JSON'
107+ 'update:Update package dependencies'
108 'describe:Describe the current package'
109+ 'resolve:Resolve package dependencies'
110+ 'tools-version:Manipulate tools version of the current package'
111 'unedit:Remove a package from editable mode'
112- 'update:Update package dependencies'
113+ 'show-dependencies:Print the resolved dependency graph'
114+ 'fetch:'
115+ 'dump-package:Print parsed Package.swift as JSON'
116+ 'edit:Put a package in editable mode'
117+ 'config:Manipulate configuration of the package'