I noticed that bash tab completion returns less files if I use an argparse parameter. How can I change/control that?
minimal example code
me@here:~/test$ cat argparsetest.py
import argparse
parser.add_argument('-i', help='input', required=True)
bash completion examples:
# shows all the files
me@here:~/test$ python argparsetest.py
argparsetest.py result.png u1.py
# does not show the image result.png I am actually interested in
me@here:~/test$ python argparsetest.py -i
argparsetest.py u1.py
There are already two similar questions, but I did not find them helpfull.