Skip to content

Instantly share code, notes, and snippets.

@correia
Last active August 29, 2015 14:02
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save correia/2076f6c427697e1df8b3 to your computer and use it in GitHub Desktop.
Save correia/2076f6c427697e1df8b3 to your computer and use it in GitHub Desktop.
A verbose alternative to NSProcessInfo.processInfo().arguments
//
// command-line-args.swift
//
// Created by Jim Correia on 6/4/14.
// Copyright (c) 2014-2015 Jim Correia. All rights reserved.
//
print("PROG_NAME = \(Process.arguments[0])")
print("ARGC = \(Process.argc)")
print("ARGV = \(Process.arguments)")
@correia
Copy link
Author

correia commented Jun 10, 2015

Updated for Swift 2 on 2015/06/10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment