Skip to content

A cute little Bash library for blazing fast argument parsing

License

Notifications You must be signed in to change notification settings

bash-bastion/bash-args

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bash-args

A cute little Bash library for blazing fast argument parsing

STATUS: IN DEVELOPMENT!

Summary

  • Uses only builtins
  • Uses no subshells
  • Simple API

Usage

barg.define_flags \
	one \
		'--alfa' '-a' '|bool|' 'desc' \
		'--bravo' '' 'i' 'desc' \
		'' '-charlie' 'i' 'desc' \
		END \
	subcommand \
		END

barg.parse_flags "$@"

Installation

Use Basalt, a Bash package manager, to add this project as a dependency

basalt add hyperupcall/bash-args