diff options
author | Lex Spoon <lex@lexspoon.org> | 2006-06-22 13:56:07 +0000 |
---|---|---|
committer | Lex Spoon <lex@lexspoon.org> | 2006-06-22 13:56:07 +0000 |
commit | d0ff5e5680be0d73657c69efb838834a7524886d (patch) | |
tree | e398f2acb0a8183de8c48a7b4b9f370f495acbb2 /src/compiler | |
parent | b1be740f87533dd7381268018072cc71174935ae (diff) | |
download | scala-d0ff5e5680be0d73657c69efb838834a7524886d.tar.gz scala-d0ff5e5680be0d73657c69efb838834a7524886d.tar.bz2 scala-d0ff5e5680be0d73657c69efb838834a7524886d.zip |
added -cp as an abbreviation for -classpath
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/Settings.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/Settings.scala b/src/compiler/scala/tools/nsc/Settings.scala index d6cd2536f6..8db03da28c 100644 --- a/src/compiler/scala/tools/nsc/Settings.scala +++ b/src/compiler/scala/tools/nsc/Settings.scala @@ -79,6 +79,7 @@ class Settings(error: String => unit) { val noassertions = BooleanSetting("-noassert", "Generate no assertions and assumptions") val verbose = BooleanSetting("-verbose", "Output messages about what the compiler is doing") val classpath = StringSetting ("-classpath", "path", "Specify where to find user class files", classpathDefault) + classpath.abbreviation = "-cp" val sourcepath = StringSetting ("-sourcepath", "path", "Specify where to find input source files", "") val bootclasspath = StringSetting ("-bootclasspath", "path", "Override location of bootstrap class files", bootclasspathDefault) val extdirs = StringSetting ("-extdirs", "dirs", "Override location of installed extensions", extdirsDefault) @@ -165,10 +166,12 @@ class Settings(error: String => unit) { /** A setting represented by a string, (`default' unless set) */ case class StringSetting(name: String, arg: String, descr: String, default: String) extends Setting(name, descr) { + var abbreviation: String = null + var value: String = default def tryToSet(args: List[String]): List[String] = args match { - case n :: rest if (n == name) => + case n :: rest if (name == n || abbreviation == n) => if (rest.isEmpty) { error("missing argument") List() |