-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix xcode plugin #4235
Fix xcode plugin #4235
Conversation
1c874ce
to
1a3b418
Compare
@DarthMike, @Palleas can you test this PR? |
1a3b418
to
19c2d60
Compare
19c2d60
to
cc2ee94
Compare
@apjanke can I get a pair of eyes more? |
@mcornella Tested now: |
Thanks! |
Changes look good to me. I briefly tested on OS X 10.9. How about having |
@DarthMike, I have a doubt. @apjanke good point, added a return statement. |
eecefe9
to
f62e8a0
Compare
Looks like it's a file extension, and not a hidden directory, at least for new projects using Xcode 6.x. I fired up Xcode and made a new project called "Whatever", and it gave me a I'm not a Mac developer; maybe someone with more Xcode experience can chime in. |
In OSX some directories, sometimes called bundles, seem like files. XCode workspaces and projects are actually directories with extensions. Same as a .app. So yes you can treat it as an extension and it's fine. The error when opening might be because of XCode versions, not related to the finding of the file. It's not safe to search only for ".xc*" because iOS and OSX projects can use bundles for images with extension ".xcasset". They generally should not be in the same level as the project, but I've seen it happening. |
Updated code works for me. I created a couple projects in Xcode, including one with spaces and special symbols in the name, and One possibly-surprising behavior that may be worth noting in the comments for this plugin: the |
Say, would you mind guarding that
This should do it.
|
Oh, you know what... maybe that |
I'm ok with that change, give me a minute. |
Updated. I'm considering adding a README file as well. @DarthMike you use the plugin, could you tell me what's your typical workflow with it? |
2438bd4
to
f260a59
Compare
New |
Hey, what do you folks think of this: an
If you like it we could extend it to list the installed versions and do tab completion of the version numbers. |
Uses zsh arrays and globbing to find .xcworkspace and .xcodeproj files.
This also gets rid of `xcode-select` command-not-found errors.
f260a59
to
ec3694c
Compare
I've added a README for the plugin, let's see what you think of it. @apjanke I'd rather keep this PR to only fixing the plugin, not adding new functionality. But it is true that it would be more useful than the current |
@mcornella Awesome work 😄 I generally use the plugin to open xcode from command line, as I use it for most 'out of IDE' work. So most times it's just using 'xc' and 'simulator'. Regarding changing xcodes, I think it would be a good idea to add it; I don't switch xcodes so often but it can be really useful if you have to. |
Ok, I finally made my mind as to add the Hopefully it will be merged soon. Cheers! |
Thanks! I extended the It's on fix-xcode-plugin-apjanke-02. Let me know if you'd like to fold it in here, or would rather have a separate PR for it.
Completion: |
Wow Andrew that is |
316317e
to
6642a99
Compare
Updated with an EOF newline fix in |
You're welcome! |
Fix xcode plugin
This PR does the following:
xc()
function by only looking for.xcworskpace
and.xcodeproj
files.It also cleans it up by using zsh arrays and localized variables.
xcsel
function into an alias, since it doesn't do anything extraordinary and"$*"
might have side effects.Closes #3259, #3950.