Skip to content

Instantly share code, notes, and snippets.

@jballanc
Created January 21, 2015 03:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jballanc/d05f11b76cfb6276be1d to your computer and use it in GitHub Desktop.
Save jballanc/d05f11b76cfb6276be1d to your computer and use it in GitHub Desktop.
(ns foo.core)
(defn -main [& args]
(println "Passed in 'args' are:" args))
> lein foo bar baz
Passed in 'args' are: (bar baz)
> lein run -m foo.core bar baz
Passed in 'args' are: (bar baz)
> lein foo --help
foo is an alias, expands to ["run" "-m" "foo.core"]
> lein run -m foo.core --help
Passed in 'args' are: (--help)
> lein foo -- --help
Passed in 'args' are: (-- --help)
(defproject foo "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]]
:aliases {"foo" ["run" "-m" "foo.core"]})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment