Bug 1519968 - [mach] Minor improvements to autocomplete docs, r=jmaher
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Mon, 14 Jan 2019 19:43:53 +0000
changeset 513792 1cf230625662499e8c2d0315cfa9d7cd161e1a48
parent 513791 1ce15a2a79e08b2b8803d42b06476d5b101111d0
child 513793 36ec37a680354b2a1fb3b2232f24a65172d71962
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1519968
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1519968 - [mach] Minor improvements to autocomplete docs, r=jmaher Differential Revision: https://phabricator.services.mozilla.com/D16495
python/mach/docs/usage.rst
tools/lint/codespell.yml
--- a/python/mach/docs/usage.rst
+++ b/python/mach/docs/usage.rst
@@ -39,30 +39,50 @@ following are valid:
     $ ./mach help try fuzzy
     $ ./mach try -h
     $ ./mach try fuzzy --help
 
 
 Auto Completion
 ---------------
 
-A `bash completion`_ script is bundled with mach. To enable it with ``bash``,
-add the following to your ``~/.bashrc``, ``~/.bash_profile`` or equivalent:
+A `bash completion`_ script is bundled with mach, it can be used with either ``bash`` or ``zsh``.
+
+Bash
+~~~~
+
+Add the following to your ``~/.bashrc``, ``~/.bash_profile`` or equivalent:
 
 .. code-block:: shell
 
     source <srcdir>/python/mach/bash-completion.sh
 
-This script can also be used with ``zsh``. Add this to your ``~/.zshrc`` or
-equivalent:
+.. tip::
+
+    Windows users using the default shell bundled with mozilla-build should source the completion
+    script from ``~/.bash_profile`` (it may need to be created first).
+
+Zsh
+~~~
+
+Add this to your ``~/.zshrc`` or equivalent:
 
 .. code-block:: shell
 
-    autoload bashcompinit
-    bashcompinit
+    autoload -U bashcompinit && bashcompinit
+    source <srcdir>/python/mach/bash-completion.sh
+
+The ``compinit`` function also needs to be loaded, but if using a framework (like ``oh-my-zsh``),
+this will often be done for you. So if you see ``command not found: compdef``, you'll need to modify
+the above instructions to:
+
+.. code-block:: shell
+
+    autoload -U compinit && compinit
+    autoload -U bashcompinit && bashcompinit
     source <srcdir>/python/mach/bash-completion.sh
 
 Don't forget to substitute ``<srcdir>`` with the path to your checkout.
 
 
 User Settings
 -------------
 
--- a/tools/lint/codespell.yml
+++ b/tools/lint/codespell.yml
@@ -19,16 +19,17 @@ codespell:
         - layout/tools/layout-debug/ui/locale/en-US/
         - mobile/android/base/locales/en-US/
         - mobile/android/branding/
         - mobile/android/docs/
         - mobile/android/locales/en-US/
         - mobile/locales/en-US/
         - netwerk/locales/en-US/
         - python/docs/
+        - python/mach/docs/
         - python/mozlint/
         - python/safety/
         - services/sync/locales/en-US/
         - taskcluster/docs/
         - testing/mozbase/docs/
         - toolkit/components/extensions/docs/
         - toolkit/components/telemetry/docs/
         - toolkit/crashreporter/docs/