         alias: 'prompt'
         describe: 'Set prompt string'
         string: true
+    .options 'plugins',
+        describe: 'List auto-loaded plugins'
+        boolean: true
     .options 'v',
         alias: 'version'
         describe: 'Show version and exit'

        nesh.log.debug 'Compiling eval data'
        opts.evalData = nesh.compile opts.evalData

nesh.config.load()

nesh.start opts, (err) ->
    console.error err.toString().red if err

if argv.verbose
    nesh.log.level = nesh.log.DEBUG

nesh.config.load()

if argv.enable
    enabled = argv.enable.split ','

    config = nesh.config.get()
    config.plugins ?= []
    config.plugins = _(config.plugins.concat enabled).uniq()
    config.pluginsExclude ?= []
    config.pluginsExclude = _(config.pluginsExclude).reject (item) -> item in enabled

    nesh.config.save()

if argv.disable
    disabled = argv.disable.split ','

    config = nesh.config.get()
    config.plugins ?= []
    config.plugins = _(config.plugins).reject (item) -> item in disabled
    config.pluginsExclude ?= []
    config.pluginsExclude = _(config.pluginsExclude.concat disabled).uniq()

    nesh.config.save()

if argv.enable or argv.disable
    return

if argv.c
    argv.lang = 'coffee'

