From: Shane Jaroch Date: Mon, 18 Jul 2022 04:29:43 +0000 (-0400) Subject: coveralls & git bash argcomplete guide (#7) X-Git-Tag: v0.2.5~6 X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=825e31c41bb678466336b263da5313ea4e7571c7;p=nutratech%2Fcli.git coveralls & git bash argcomplete guide (#7) --- diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000..a8d540e --- /dev/null +++ b/.mailmap @@ -0,0 +1,11 @@ +# Kyle +Kyle +Kyle + +# Shane +Shane +Shane +Shane +Shane +Shane + diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..3b7fc41 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +--- +dist: xenial +os: ["linux"] +language: python +python: + - "3.6" +git: + submodules: true +install: + - python -m pip install coveralls + - make _deps +script: + - make _test + - coveralls diff --git a/README.rst b/README.rst index 7e47c3a..ae9f54b 100644 --- a/README.rst +++ b/README.rst @@ -9,6 +9,10 @@ :target: https://github.com/nutratech/cli/actions/workflows/test-win32.yml :alt: Build status unknown (Windows) +.. image:: https://coveralls.io/repos/github/nutratech/cli/badge.svg?branch=master + :target: https://coveralls.io/github/nutratech/cli?branch=master + :alt: Coverage unknown + .. image:: https://badgen.net/pypi/v/nutra :target: https://pypi.org/project/nutra/ :alt: Latest version unknown @@ -113,12 +117,16 @@ Install the dependencies (``make deps``) and then: # source .venv/bin/activate # uncomment if NOT using direnv make format lint test -Argcomplete (tab completion on Linux/macOS) +ArgComplete (tab completion / autocomplete) =========================================== -After installing nutra, argcomplete package should also be installed, +After installing nutra, argcomplete package should also be installed. + +Linux, macOS, and Linux Subsystem for Windows +############################################# -Simply run the following out of a ``bash`` shell: +Simply run the following out of a ``bash`` shell. Check their page for more +specifics on using other shells, e.g. ``zsh``, ``fish``, or ``tsh``. .. code-block:: bash @@ -127,6 +135,29 @@ Simply run the following out of a ``bash`` shell: Then you can press tab to fill in or complete subcommands and to list argument flags. +Windows (Git Bash) +################## + +This can work with git bash too. I followed the instructions on their README. + +I've run the command to seed the autocomplete script. + +.. code-block:: bash + + mkdir -p $HOME/.bash_completion.d + activate-global-python-argcomplete --dest=$HOME/.bash_completion.d + +And my ``~/.bashrc`` file looks like this. + +.. code-block:: bash + + export ARGCOMPLETE_USE_TEMPFILES=1 + + # python bash completion + if [ -f ~/.bash_completion.d/python-argcomplete ]; then + source ~/.bash_completion.d/python-argcomplete + fi + **NOTE:** This is a work in progress, we are adding more autocomplete functions.