Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
fedef5db
Unverified
Commit
fedef5db
authored
Oct 11, 2023
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(xcode): open Xcode in current Desk if already open in another (#10384)
Fixes #10384
parent
da3b8fcb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
xcode.plugin.zsh
plugins/xcode/xcode.plugin.zsh
+7
-0
No files found.
plugins/xcode/xcode.plugin.zsh
View file @
fedef5db
...
@@ -17,6 +17,13 @@ function xc {
...
@@ -17,6 +17,13 @@ function xc {
local
active_path
local
active_path
active_path
=
${
"
$(
xcode-select
-p
)
"
%%/Contents/Developer*
}
active_path
=
${
"
$(
xcode-select
-p
)
"
%%/Contents/Developer*
}
echo
"Found
${
xcode_files
[1]
}
. Opening with
${
active_path
}
"
echo
"Found
${
xcode_files
[1]
}
. Opening with
${
active_path
}
"
# If Xcode is already opened in another Desk, we need this double call
# with -g to open the project window in the current Desk and focus it.
# See https://github.com/ohmyzsh/ohmyzsh/issues/10384
if
command
pgrep
-q
"^Xcode"
;
then
open
-g
-a
"
$active_path
"
"
${
xcode_files
[1]
}
"
fi
open
-a
"
$active_path
"
"
${
xcode_files
[1]
}
"
open
-a
"
$active_path
"
"
${
xcode_files
[1]
}
"
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment