-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add glossary of terms to documentation #3210
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
Changes from all commits
8716512
53e7d4f
6167b1d
d855e20
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,68 @@ | ||||||||||||||||||
| Glossary | ||||||||||||||||||
| ======== | ||||||||||||||||||
|
|
||||||||||||||||||
| This glossary defines key terms used throughout Click's documentation. | ||||||||||||||||||
|
|
||||||||||||||||||
| .. glossary:: | ||||||||||||||||||
| :sorted: | ||||||||||||||||||
|
|
||||||||||||||||||
| Argument | ||||||||||||||||||
| A positional parameter passed to a command without a name prefix. | ||||||||||||||||||
| Arguments are identified by their position in the command line. | ||||||||||||||||||
| For example, in ``mycli command file.txt``, ``file.txt`` is an argument. | ||||||||||||||||||
|
|
||||||||||||||||||
| Callback | ||||||||||||||||||
| A function that is invoked when a parameter is processed. Callbacks can be | ||||||||||||||||||
| attached to options or arguments for custom validation or processing. | ||||||||||||||||||
| See :doc:`/parameters` for more information. | ||||||||||||||||||
|
|
||||||||||||||||||
| Command | ||||||||||||||||||
| A function decorated with ``@click.command()`` or ``@click.group()`` | ||||||||||||||||||
| that can be invoked from the command line. Commands can accept options | ||||||||||||||||||
| and arguments. | ||||||||||||||||||
|
|
||||||||||||||||||
| Command Line Application | ||||||||||||||||||
| A Python program built with Click that provides a command line interface. | ||||||||||||||||||
| Command line applications use commands, options, and arguments to interact | ||||||||||||||||||
| with users through the terminal. | ||||||||||||||||||
|
|
||||||||||||||||||
| Command Line Interface (CLI) | ||||||||||||||||||
| A text-based interface for interacting with a program through commands, | ||||||||||||||||||
| options, and arguments. Click helps you build CLIs in Python. | ||||||||||||||||||
|
|
||||||||||||||||||
| Command Line Utility | ||||||||||||||||||
| A command line application designed to perform a specific task or set of | ||||||||||||||||||
| tasks. Command line utilities are often used for system administration, | ||||||||||||||||||
| file manipulation, or development workflows. | ||||||||||||||||||
|
|
||||||||||||||||||
|
Comment on lines
+33
to
+37
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Personally I'd remove this to avoid confusion. |
||||||||||||||||||
| Context | ||||||||||||||||||
| An object that carries state between commands in a group hierarchy. | ||||||||||||||||||
| The context is created for each command invocation and can be accessed | ||||||||||||||||||
| via the ``@click.pass_context`` decorator. | ||||||||||||||||||
|
|
||||||||||||||||||
| Flag | ||||||||||||||||||
| A boolean option that doesn't take a value (e.g., ``--verbose`` or ``-v``). | ||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not too familiar with how glossaries work in Sphinx. But will "option" here link to the glossary for that word down below automatically or does that need to be done explicitly here and elsewhere in the code? I hope it's the latter. |
||||||||||||||||||
| Flags are either present (True) or absent (False). | ||||||||||||||||||
|
|
||||||||||||||||||
| Group | ||||||||||||||||||
| A command that contains other commands (subcommands). Created with | ||||||||||||||||||
| ``@click.group()``. Groups allow organizing commands hierarchically. | ||||||||||||||||||
|
|
||||||||||||||||||
| Multi-command | ||||||||||||||||||
| A command that groups multiple subcommands together. Groups and | ||||||||||||||||||
| multi-commands are similar concepts in Click. | ||||||||||||||||||
|
Comment on lines
+50
to
+53
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
|
|
||||||||||||||||||
| Option | ||||||||||||||||||
| A named parameter passed to a command, typically with a dash prefix | ||||||||||||||||||
| (e.g., ``--name value`` or ``-n value``). Options can have values | ||||||||||||||||||
| or be used as flags. | ||||||||||||||||||
|
|
||||||||||||||||||
| Parameter | ||||||||||||||||||
| The general term for both options and arguments that can be passed | ||||||||||||||||||
| to a command. Parameters are defined using decorators like | ||||||||||||||||||
| ``@click.option()`` or ``@click.argument()``. | ||||||||||||||||||
|
|
||||||||||||||||||
| Terminal | ||||||||||||||||||
| A text-based interface for interacting with the operating system. | ||||||||||||||||||
| Also known as a command prompt, console, or shell. Command line | ||||||||||||||||||
| interfaces are used within a terminal to run commands and applications. | ||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -95,6 +95,7 @@ General Reference | |
| -------------------- | ||
|
|
||
| .. toctree:: | ||
| glossary | ||
| :maxdepth: 1 | ||
|
|
||
| parameters | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct me if I'm wrong here. But I feel like "CLI" is common nomenclature for the application, regardless of what the true acronym stands for.