Jeremy W. Sherman

stay a while, and listen

Radar tip: Shell one-liners to dump configuration info

With the current Xcode and Swift betas, I find myself needing to paste in the versions of my OS, Xcode, and Swift every time I file a new Radar.

So I use these handy aliases:

1
2
alias rdrconf='{ xcodebuild -version; echo; sw_vers; }'
alias swfconf='{ xcodebuild -version; echo; sw_vers; echo; xcrun swift --version; }'

The echo bits are there to put a blank line between the different lists of versions. The output looks like this:

1
2
3
4
5
6
7
8
9
10
% swfconf
Xcode 6.0
Build version 6A267n

ProductName:    Mac OS X
ProductVersion: 10.9.4
BuildVersion:   13E28

Swift version 1.0 (swift-600.0.41.2.2)
Target: x86_64-apple-darwin13.3.0

To copy that into my browser, I do:

1
% swfconf | pbcopy

followed by a Cmd-v into the form field.