Unverified Commit 452ddff7 authored by Kyle's avatar Kyle Committed by GitHub

feat(xcode): support `.swiftpm` as project file in `xc` (#10434)

parent 03146043
...@@ -26,7 +26,7 @@ plugins=(... xcode) ...@@ -26,7 +26,7 @@ plugins=(... xcode)
### `xc` ### `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. Returns 1 if it didn't find any relevant files.
### `xx` ### `xx`
......
...@@ -7,7 +7,7 @@ alias xcsel='sudo xcode-select --switch' ...@@ -7,7 +7,7 @@ alias xcsel='sudo xcode-select --switch'
# source: https://gist.github.com/subdigital/5420709 # source: https://gist.github.com/subdigital/5420709
function xc { function xc {
local xcode_files 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 if [[ ${#xcode_files} -eq 0 ]]; then
echo "No Xcode files found in ${1:-the current directory}." >&2 echo "No Xcode files found in ${1:-the current directory}." >&2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment