package getopt

  1. Overview
  2. Docs
Parsing of command line arguments (similar to GNU GetOpt) for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

20230213.tar.gz
md5=14a2c956af6145aaf293c62dfa36e099
sha512=1b40a0cf4ba6486626c38b89d7aae033b92c582b50fe160a05560397d9c261d1cc850727dd50602e0342612688c1223b95d0c6900b19f0a343c039577b8f08d0

Description

General command line syntax of GNU getopt and getopt_long, but is close to the spirit of the Arg module.

Tags

topics command-line

Published: 16 Feb 2023

README

Getopt: command line parsing à la GNU getopt

Copyright (C) 2000-2004 Alain Frisch distributed under an MIT-like license (see the COPYING file)

What is it ?

The OCaml distribution comes with the module Arg specialized in command-line parsing. However, it doesn't support the well known features of GNU getopt and getopt_long.

The module Getopt is an alternative; it supports GNU syntax, but from the programmer point of view, it is close to the spirit of Arg: the programmer gives to the general parsing function a list of possible options, together with the behaviour of these options.

General usage information

The documentation is included in the file getopt.mli. There is an example in test/getopt_test.ml

Dependencies (2)

  1. dune >= "3.6"
  2. ocaml >= "4.07"

Dev Dependencies (1)

  1. odoc with-doc

Used by (2)

  1. chase < "1.5"
  2. syguslib-utils

Conflicts

None