-
Notifications
You must be signed in to change notification settings - Fork 39
Completion of environment variable names #172
Copy link
Copy link
Open
Description
When working in shells it is common to store values in environment variables, and most commands allow tab completion of environment variable names, for example:
$ echo $BASH_V<TAB>
$ echo $BASH_VERSI<TAB><TAB>
$BASH_VERSINFO $BASH_VERSION
$ echo $BASH_VERSIO<TAB>
$ echo $BASH_VERSIONUnfortunately, when an shtab completion script is activated, the completion of environment variable names doesn't work. For instance take the following script:
from argparse import ArgumentParser
import shtab
parser = ArgumentParser()
parser.add_argument("--pid", type=int)
shtab.add_argument_to(parser, "--shell-completion")
print(parser.parse_args())The following doesn't complete anything:
$ cli.py --pid $BASHP<TAB><TAB>Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels