An open API service indexing awesome lists of open source software.

https://github.com/filmil/gotopt2

gotopt2: a self-contained shell flags or options parser, written in go
https://github.com/filmil/gotopt2

Last synced: 23 days ago
JSON representation

gotopt2: a self-contained shell flags or options parser, written in go

Awesome Lists containing this project

README

        

# `gotopt2`: a self-contained shell flags or options parser, written in go

![Build Status](https://github.com/filmil/gotopt2/workflows/Release/badge.svg) | ![Build Status](https://github.com/filmil/gotopt2/workflows/Test/badge.svg)

`gotopt2` is a program that outputs its command line arguments as a snippet of
shell script that can be readily evaluated.

You can use it to parse command line options in your shell script instead of
rolling your own flag parsing code, or using `getopt` or similar.

## Quick example

Here is how to check, quickly, what `gotopt2` does for you.

```console
gotopt2 -a -b=foo -c=10 --name value arg1 arg2 --things=eenie,meenie <