argparse

package argparse

Type members

Classlikes

final class Argument[A](name: String) extends () => A

The future value of an argument.

The future value of an argument.

You can obtain an instance of this class through the various param() methods of ArgumentParser.

Once arguments have been parsed by the ArgumentParser, the .value() method in this class will become available.

sealed trait BashCompleter
Companion
object
Companion
class
case class arg(aliases: Seq[String], doc: String, env: String) extends StaticAnnotation
object default extends Api

The recommended API bundle. Includes readers for most common types.

The recommended API bundle. Includes readers for most common types.

case class main() extends StaticAnnotation
object term

Properties of the current terminal.

Properties of the current terminal.

object userdirs

Common directories for user applications, as specified by the XDG Base Directory Specification, with some adaptations made for macOS.

Common directories for user applications, as specified by the XDG Base Directory Specification, with some adaptations made for macOS.

See also

dirs for conventional directories for an application of a given name, including system services.

Deprecated classlikes

@deprecated("use userdirs for user-specific directories, and the FHS standard for system dirs", "0.10.3")
case class dirs(name: String, system: Boolean)

Common directories for an application of a given name.

Common directories for an application of a given name.

The directories here are implemented as a mix of the XDG Base Directory Specification, macOS adaptations and a fallback to classic unix directories for system applications.

Applications are encouraged to use these directories instead of creating their own hierarchies. They are particularly well-suited for use as parameter defaults, for example:

val parser = argparse.ArgumentParser()
val cache = parser.param[os.Path](
 "--cache-dir",
 default = argparse.dirs("myapp").cache
Value Params
name

the name of the application

system

use system-wide paths instead of user-specific ones

Companion
object
Deprecated
@deprecated("use userdirs for user-specific directories, and the FHS standard for system dirs", "0.10.3")
object dirs
Companion
class
Deprecated