mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Add initial help message
This commit is contained in:
@@ -16,7 +16,18 @@ getHomeDir = ->
|
||||
process.env[if process.platform is 'win32' then 'USERPROFILE' else 'HOME']
|
||||
|
||||
parseCommandLine = ->
|
||||
args = optimist(process.argv[1..]).argv
|
||||
options = optimist(process.argv[1..])
|
||||
options.usage """
|
||||
|
||||
Usage: atom [options] [file ..]
|
||||
|
||||
"""
|
||||
options.alias('h', 'help').boolean('h').describe('h', 'Print this usage message.')
|
||||
args = options.argv
|
||||
if args.h
|
||||
options.showHelp()
|
||||
process.exit(0)
|
||||
|
||||
executedFrom = args['executed-from']
|
||||
pathsToOpen = if args._.length > 0 then args._ else null
|
||||
testMode = true if args['test']
|
||||
|
||||
Reference in New Issue
Block a user