From 452ddff763ebbaba40a060006e8290d497e2993a Mon Sep 17 00:00:00 2001 From: Kyle <43724855+Kyle-Ye@users.noreply.github.com> Date: Fri, 26 Nov 2021 06:57:08 +0800 Subject: [PATCH] feat(xcode): support `.swiftpm` as project file in `xc` (#10434) --- plugins/xcode/README.md | 2 +- plugins/xcode/xcode.plugin.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/xcode/README.md b/plugins/xcode/README.md index 664a063a3..27d6a228b 100644 --- a/plugins/xcode/README.md +++ b/plugins/xcode/README.md @@ -26,7 +26,7 @@ plugins=(... xcode) ### `xc` -Opens the current directory in Xcode as an Xcode project or a Swift package. This will open one of the `.xcworkspace`, `.xcodeproj` and `Package.swift` files that it can find in the current working directory. You can also specify a directory to look in for the Xcode files. +Opens the current directory in Xcode as an Xcode project or a Swift package. This will open one of the `.xcworkspace`, `.xcodeproj`, `.swiftpm` and `Package.swift` files that it can find in the current working directory. You can also specify a directory to look in for the Xcode files. Returns 1 if it didn't find any relevant files. ### `xx` diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh index 41b9e37e4..3bd12cdec 100644 --- a/plugins/xcode/xcode.plugin.zsh +++ b/plugins/xcode/xcode.plugin.zsh @@ -7,7 +7,7 @@ alias xcsel='sudo xcode-select --switch' # source: https://gist.github.com/subdigital/5420709 function xc { local xcode_files - xcode_files=(${1:-.}/{*.{xcworkspace,xcodeproj},Package.swift}(N)) + xcode_files=(${1:-.}/{*.{xcworkspace,xcodeproj,swiftpm},Package.swift}(N)) if [[ ${#xcode_files} -eq 0 ]]; then echo "No Xcode files found in ${1:-the current directory}." >&2