Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): reintroduce shell completion command #2562

Merged
merged 6 commits into from Jan 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion docs/how-to-guides/shell-integration.rst
Expand Up @@ -5,6 +5,14 @@ Shell integration of Renku CLI

Renku CLI supports shell auto-completion for Renku commands and their arguments like datasets and workflows.

A convenience method is available for printing to the standard output the shell completion command for the
currently used shell:

.. code-block:: console

$ renku env --shell-completion
_RENKU_COMPLETE=zsh_source renku

To activate tab completion for your supported shell run the following command after installing Renku CLI:

.. tabs::
Expand Down Expand Up @@ -37,7 +45,7 @@ in case of ``renku workflow execute`` the available ``Plans`` are going to be li

.. note::

Tab completion of available ``Plans`` only works if the user is executing the command
Tab completion of available ``Plans`` (or ``Datasets``) only works if the user is executing the command
within a Renku project.


Expand Down
54 changes: 53 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Expand Up @@ -129,6 +129,7 @@ rich = "<10.13.0,>=9.3.0"
rq = { version = "==1.10.0", optional = true }
rq-scheduler = { version = "==0.11.0", optional = true }
sentry-sdk = { version = "<1.4.4,>=0.7.4", extras = ["flask"], optional = true }
shellingham = "1.4.0"
sphinxcontrib-spelling = { version = "7.*", optional = true }
sphinx-rtd-theme = { version = "<1.1,>=0.5.0", optional = true }
sphinx-tabs = { version = "==3.2.0", optional = true }
Expand Down
4 changes: 3 additions & 1 deletion renku/cli/__init__.py
Expand Up @@ -73,6 +73,7 @@
from renku.cli.config import config
from renku.cli.dataset import dataset
from renku.cli.doctor import doctor
from renku.cli.env import env
from renku.cli.exception_handler import IssueFromTraceback
from renku.cli.githooks import githooks as githooks_command
from renku.cli.graph import graph
Expand Down Expand Up @@ -115,7 +116,7 @@ def get_entry_points(name: str):
return all_entry_points.get(name, [])


WARNING_UNPROTECTED_COMMANDS = ["clone", "init", "help", "login", "logout", "service", "credentials"]
WARNING_UNPROTECTED_COMMANDS = ["clone", "init", "help", "login", "logout", "service", "credentials", "env"]


def _uuid_representer(dumper, data):
Expand Down Expand Up @@ -209,6 +210,7 @@ def help(ctx):
cli.add_command(config)
cli.add_command(dataset)
cli.add_command(doctor)
cli.add_command(env)
cli.add_command(githooks_command)
cli.add_command(graph)
cli.add_command(init_command)
Expand Down