Skip to content
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

[Feature] Add -k, --kinda-quiet flag to suppress all output except for the .xcodeproj path upon success #1161

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tww0003
Copy link

@tww0003 tww0003 commented Dec 30, 2021

I'm open to suggestions on the flag name.

What?

Adds a new flag that suppresses all output aside from the .xcodeproj path upon success.

Why?

To allow for easier scripting.

For example, I generally quit Xcode before running xcodegen, then use the open command to open the project like this:

tyler@mbp Example % xcodegen

⚙️  Generating plists...
⚙️  Generating project...
⚙️  Writing project...
Created project at /Users/tyler/Example/Example.xcodeproj
tyler@mbp Example % open Example.xcodeproj

Since having to always enter the same two commands is slightly annoying to me, I wanted to combine them into one command and use that in an alias.

Without the flag I would need to do something like this:

xcodegen | grep "Created project at" | cut -d ' ' -f 4 | xargs -I project open project

With the flag it can be simplified to just:

xcodegen -k | xargs -I project open project

Example Use

tyler@mbp Example % xcodegen -k
/User/tyler/Example/Example.xcodeproj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant