You can clone with
HTTPS or Subversion.
No description provided.
Usually this requires modifying ~/.bashrc in order to work. And very few people do that even for such complex interfaces as git.
So, requiring high effort and having low impact, this is given low priority, unless someone implements that and makes a pull request.
Check out infi.docopt_completion. It generates shell auto-completion for a given docopt utility.
docopt-completion [script name]
The code is available here:
@wiggin15 Test at docopt.__version__ = 0.6.1 but have problems, it does not work. at Ubuntu 12.04 32bit.
test the simple file docopt_example.py as follow:
docopt.__version__ = 0.6.1
# coding: utf-8
docopt_example.py tcp <host> <port> [--timeout=<seconds>]
docopt_example.py serial <port> [--baud=9600] [--timeout=<seconds>]
docopt_example.py -h | --help | --version
from docopt import docopt
if __name__ == '__main__':
arguments = docopt(__doc__, version='0.1.1rc')
The test command is:
sudo docopt-completion ./docopt_example.py
Completion file written to /etc/bash_completion.d/docopt_example.py.sh
I think this means is OK, but still can not use tab-completion at ./docopt_example.py
So Which steps I was wrong?
You're right, looks like this happens because docopt-completion does not sanitize the "." in ".py". Please open an issue in the docopt-completion repository (link above) and I'll fix it. In the meantime you can change the name from docopt_example.py to docopt_example and see if that works.