From 3ee4c139b31fde892bbf77d599fb592dace90de0 Mon Sep 17 00:00:00 2001 From: Shun Sakai Date: Wed, 13 May 2020 23:34:08 +0900 Subject: [PATCH] Add completions for Sphinx --- CHANGELOG.md | 1 + share/completions/sphinx-apidoc.fish | 25 +++++++++++++++ share/completions/sphinx-autogen.fish | 6 ++++ share/completions/sphinx-build.fish | 29 +++++++++++++++++ share/completions/sphinx-quickstart.fish | 41 ++++++++++++++++++++++++ 5 files changed, 102 insertions(+) create mode 100644 share/completions/sphinx-apidoc.fish create mode 100644 share/completions/sphinx-autogen.fish create mode 100644 share/completions/sphinx-build.fish create mode 100644 share/completions/sphinx-quickstart.fish diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d82387a8..722a878b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ - `gitk` - `nc`, `netcat`, `nc.openbsd`, `nc.traditional` - `nmap`, `ncat` + - `sphinx-apidoc`, `sphinx-autogen`, `sphinx-build` and `sphinx-quickstart` - `tcpdump` - `tig` - `windscribe` diff --git a/share/completions/sphinx-apidoc.fish b/share/completions/sphinx-apidoc.fish new file mode 100644 index 000000000..49ddf5e3a --- /dev/null +++ b/share/completions/sphinx-apidoc.fish @@ -0,0 +1,25 @@ +complete -c sphinx-apidoc -s h -l help -d "Display usage summary" +complete -c sphinx-apidoc -l version -d "Display Sphinx version" +complete -c sphinx-apidoc -s o -d "Directory to place all output" +complete -c sphinx-apidoc -s q -d "No output on stdout" +complete -c sphinx-apidoc -s f -l force -d "Overwrite existing files" +complete -c sphinx-apidoc -s l -l follow-links -d "Follow symbolic links" +complete -c sphinx-apidoc -s n -l dry-run -d "Run the script without creating files" +complete -c sphinx-apidoc -s s -d "File suffix" +complete -c sphinx-apidoc -s d -d "Maximum depth of submodules" +complete -c sphinx-apidoc -l tocfile -d "Filename of table of contents" +complete -c sphinx-apidoc -s T -l no-toc -d "Do not create a table of contents file" +complete -c sphinx-apidoc -s F -l full -d "Generate a full Sphinx project" +complete -c sphinx-apidoc -s e -l separate -d "Put doc for each module on its own page" +complete -c sphinx-apidoc -s E -l no-headings -d "Do not create headings" +complete -c sphinx-apidoc -s P -l private -d "Include _private modules" +complete -c sphinx-apidoc -l implicit-namespaces -d "Interpret module paths according to PEP-0420" +complete -c sphinx-apidoc -s M -l module-first -d "Put module doc before submodule doc" +complete -c sphinx-apidoc -s a -d "Append module_path to sys.path" +complete -c sphinx-apidoc -s H -d "Project name" +complete -c sphinx-apidoc -s A -d "Project author" +complete -c sphinx-apidoc -s V -d "Project version" +complete -c sphinx-apidoc -s R -d "Project release" + +# Project templating +complete -c sphinx-apidoc -s t -l templatedir -d "Template directory for template files" diff --git a/share/completions/sphinx-autogen.fish b/share/completions/sphinx-autogen.fish new file mode 100644 index 000000000..6bcedf5f8 --- /dev/null +++ b/share/completions/sphinx-autogen.fish @@ -0,0 +1,6 @@ +complete -c sphinx-autogen -s h -l help -d "Display usage summary" +complete -c sphinx-autogen -l version -d "Display Sphinx version" +complete -c sphinx-autogen -s o -d "Directory to place all output" +complete -c sphinx-autogen -s s -l suffix -d "Default suffix for files" +complete -c sphinx-autogen -s t -l templates -d "Custom template directory" +complete -c sphinx-autogen -s i -l imported-members -d "Document imported members" diff --git a/share/completions/sphinx-build.fish b/share/completions/sphinx-build.fish new file mode 100644 index 000000000..92fa4803f --- /dev/null +++ b/share/completions/sphinx-build.fish @@ -0,0 +1,29 @@ +complete -c sphinx-build -s h -l help -d "Display usage summary" +complete -c sphinx-build -l version -d "Display Sphinx version" + +# General Options +complete -x -c sphinx-build -s b -a "html dirhtml singlehtml htmlhelp qthelp devhelp epub applehelp latex man texinfo text gettext doctest linkcheck xml pseudoxml" -d "Builder to use" +complete -x -c sphinx-build -s M -a "latexpdf info" -d "Alternative to -b" +complete -c sphinx-build -s a -d "Write all files" +complete -c sphinx-build -s E -d "Do not use a saved environment" +complete -c sphinx-build -s d -d "Path for the cached environment and doctree files" +complete -c sphinx-build -s j -d "Build in parallel" + +# Build Configuration Option +complete -c sphinx-build -s c -d "Path to conf.py" +complete -c sphinx-build -s C -d "Do not look for a conf.py" +complete -c sphinx-build -s D -d "Override a setting in conf.py" +complete -c sphinx-build -s A -d "Pass a value into HTML templates" +complete -c sphinx-build -s t -d "Define tag" +complete -c sphinx-build -s n -d "Nit-picky mode" + +# Console Output Options +complete -c sphinx-build -s v -d "Increase verbosity" +complete -c sphinx-build -s q -d "No output on stdout" +complete -c sphinx-build -s Q -d "No output at all" +complete -c sphinx-build -s N -d "Do not emit colored output" +complete -c sphinx-build -s w -d "Write warnings to given file" +complete -c sphinx-build -s W -d "Turn warnings into errors" +complete -c sphinx-build -l keep-going -d "Keep going when getting warnings" +complete -c sphinx-build -s T -d "Show full traceback on exception" +complete -c sphinx-build -s P -d "Run Pdb on exception" diff --git a/share/completions/sphinx-quickstart.fish b/share/completions/sphinx-quickstart.fish new file mode 100644 index 000000000..8c573571a --- /dev/null +++ b/share/completions/sphinx-quickstart.fish @@ -0,0 +1,41 @@ +complete -c sphinx-quickstart -s q -l quiet -d "Quiet mode" +complete -c sphinx-quickstart -s h -l help -d "Display usage summary" +complete -c sphinx-quickstart -l version -d "Display Sphinx version" + +# Structure Options +complete -c sphinx-quickstart -l sep -d "Separate source and build directories" +complete -c sphinx-quickstart -l dot -d "Replacement for dot in _templates etc" + +# Project Basic Options +complete -c sphinx-quickstart -s p -l project -d "Project name" +complete -c sphinx-quickstart -s a -l author -d "Author names" +complete -c sphinx-quickstart -s v -d "Version of project" +complete -c sphinx-quickstart -s r -l release -d "Release of project" +complete -c sphinx-quickstart -s l -l language -d "Document language" +complete -c sphinx-quickstart -l suffix -d "Source file suffix" +complete -c sphinx-quickstart -l master -d "Master document name" + +# Extension Options +complete -c sphinx-quickstart -l ext-autodoc -d "Enable autodoc extension" +complete -c sphinx-quickstart -l ext-doctest -d "Enable doctest extension" +complete -c sphinx-quickstart -l ext-intersphinx -d "Enable intersphinx extension" +complete -c sphinx-quickstart -l ext-todo -d "Enable todo extension" +complete -c sphinx-quickstart -l ext-coverage -d "Enable coverage extension" +complete -c sphinx-quickstart -l ext-imgmath -d "Enable imgmath extension" +complete -c sphinx-quickstart -l ext-mathjax -d "Enable mathjax extension" +complete -c sphinx-quickstart -l ext-ifconfig -d "Enable ifconfig extension" +complete -c sphinx-quickstart -l ext-viewcode -d "Enable viewcode extension" +complete -c sphinx-quickstart -l ext-githubpages -d "Enable githubpages extension" +complete -c sphinx-quickstart -l extensions -d "Enable arbitrary extensions" + +# Makefile and Batchfile Creation Options +complete -c sphinx-quickstart -s m -l use-make-mode -d "Use make-mode" +complete -c sphinx-quickstart -s M -l no-use-make-mode -d "Not use make-mode" +complete -c sphinx-quickstart -l makefile -d "Create makefile" +complete -c sphinx-quickstart -l no-makefile -d "Not create makefile" +complete -c sphinx-quickstart -l batchfile -d "Create batchfile" +complete -c sphinx-quickstart -l no-batchfile -d "Not create batchfile" + +# Project templating +complete -c sphinx-quickstart -s t -l templatedir -d "Template directory for template files" +complete -c sphinx-quickstart -s d -d "Define a template variable"