The Bash Argsparse Library 1.8
An high level argument parsing library for bash.
Loading...
Searching...
No Matches
Functions
argsparse-completion.sh File Reference

Bash completion for scripts using argsparse library. More...

Functions

 __argsparse_compgen (param...)
 
 __argsparse_complete ()
 
 __argsparse_complete_get_long (word, long...)
 
 __argsparse_complete_value (option)
 
 _argsparse_complete ()
 

Detailed Description

Bash completion for scripts using argsparse library.

Author
Damien Nadé bash-.nosp@m.args.nosp@m.parse.nosp@m.@liv.nosp@m.na.or.nosp@m.g
Version
1.8
URL
https://github.com/Anvil/bash-argsparse
Purpose

To automatically enable, for bash-completion users, completion for scripts that use the argsparse library.

Usage

In your ~/.bashrc, add the following lines to enable completion for all your argsparse-written scripts:

. argsparse-completion.sh
complete -F _argsparse_complete [ your scripts names ... ]
Required configuration

argsparse-completion relies on a few shell settings:

shopt -s sourcepath

If correctly enabled, the following command below should return this output.

$ shopt sourcepath
sourcepath on
Limitations