From c9fbe1a7119a01235eb31e5f3009fa97969d6eca Mon Sep 17 00:00:00 2001 From: Bouwe Andela Date: Wed, 28 Feb 2024 14:18:01 +0100 Subject: [PATCH] Add documentation on autocompletion for command line tools --- docs/user/using_the_admin_client.md | 23 +++++++++++++++++++++++ docs/user/using_the_client.md | 24 ++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/docs/user/using_the_admin_client.md b/docs/user/using_the_admin_client.md index d09a4155ee4..c3341d5e7c8 100644 --- a/docs/user/using_the_admin_client.md +++ b/docs/user/using_the_admin_client.md @@ -6,6 +6,29 @@ title: "Using the Admin Client" Rucio provides a CLI for administrative tasks. The get methods can be executed by any user, but the set methods require some admin privileges. See the [rucio-admin help page](bin/rucio-admin.md). +The command line client for administrative tasks is called ``rucio-admin``. + +## Getting help + +To get an overview of the available ``rucio-admin`` subcommands and flags, run: + +```bash +rucio-admin --help +``` + +## Enable command line autocompletion + +If you would like to automatically complete ``rucio-admin`` commands, install +the [argcomplete](https://pypi.org/project/argcomplete/) package and run: + +```bash +eval "$(register-python-argcomplete rucio-admin)" +``` + +Next, type ``rucio-admin `` (note the trailing space) and press the +Tab key to see all available options. To use the autocompletion +feature, type enough letters of a subcommand or flag to uniquely define it +and then press Tab. ## Account and identity methods diff --git a/docs/user/using_the_client.md b/docs/user/using_the_client.md index c87399fb737..8f158252769 100644 --- a/docs/user/using_the_client.md +++ b/docs/user/using_the_client.md @@ -4,6 +4,30 @@ title: Using the Client --- Rucio provides several commands for the end-user. See [executables](bin/rucio.md). +The command line client is called ``rucio``. + + +## Getting help + +To get an overview of the available ``rucio`` subcommands and flags, run: + +```bash +rucio --help +``` + +## Enable command line autocompletion + +If you would like to automatically complete ``rucio`` commands, install the +[argcomplete](https://pypi.org/project/argcomplete/) package and run: + +```bash +eval "$(register-python-argcomplete rucio)" +``` + +Next, type ``rucio `` (note the trailing space) and press the Tab +key to see all available options. To use the autocompletion feature, type enough +letters of a subcommand or flag to uniquely define it and then press +Tab. ## Getting user information