Update documentation

This commit is contained in:
nicolargo 2025-04-11 18:43:35 +02:00
parent b4d5de96fc
commit 9e2504b056
5 changed files with 366 additions and 309 deletions

View File

@ -100,6 +100,7 @@ Dependencies:
- ``defusedxml`` (in order to monkey patch xmlrpc) - ``defusedxml`` (in order to monkey patch xmlrpc)
- ``packaging`` (for the version comparison) - ``packaging`` (for the version comparison)
- ``windows-curses`` (Windows Curses implementation) [Windows-only] - ``windows-curses`` (Windows Curses implementation) [Windows-only]
- ``shtab`` (Shell autocompletion) [All but Windows]
Optional dependencies: Optional dependencies:
@ -328,7 +329,7 @@ Where X and Y are the Major and Minor Values of your Python System.
# Example for Python 3.11.3: pkg install py311-glances # Example for Python 3.11.3: pkg install py311-glances
**NOTE:** Check Glances Binary Package Version for your System Architecture. **NOTE:** Check Glances Binary Package Version for your System Architecture.
You must have the Correct Python Version Installed which corresponds to the Glances Binary Package. You must have the Correct Python Version Installed which corresponds to the Glances Binary Package.
To install Glances from Ports: To install Glances from Ports:
@ -420,6 +421,20 @@ Ansible
A Glances ``Ansible`` role is available: https://galaxy.ansible.com/zaxos/glances-ansible-role/ A Glances ``Ansible`` role is available: https://galaxy.ansible.com/zaxos/glances-ansible-role/
Shell tab completion
====================
Glances 4.3.2 and higher includes shell tab autocompletion thanks to the --print-completion option.
For example, on a Linux operating system with Bash shell:
.. code-block:: console
$ glances --print-completion bash | sudo tee -a /etc/bash_completion.d/glances
$ source /etc/bash_completion.d/glances
Following shells are supported: bash, zsh and tcsh.
Usage Usage
===== =====

File diff suppressed because it is too large Load Diff

View File

@ -18,6 +18,10 @@ Command-Line Options
enable debug mode enable debug mode
.. option:: --print-completion
generate shell tab completion scripts for Glances CLI
.. option:: -C CONF_FILE, --config CONF_FILE .. option:: -C CONF_FILE, --config CONF_FILE
path to the configuration file path to the configuration file

View File

@ -34,5 +34,19 @@ To upgrade Glances and all its dependencies to the latest versions:
For additional installation methods, read the official `README`_ file. For additional installation methods, read the official `README`_ file.
Shell tab completion
====================
Glances 4.3.2 and higher includes shell tab autocompletion thanks to the --print-completion option.
For example, on a Linux operating system with Bash shell:
.. code-block:: console
$ glances --print-completion bash | sudo tee -a /etc/bash_completion.d/glances
$ source /etc/bash_completion.d/glances
Following shells are supported: bash, zsh and tcsh.
.. _psutil: https://github.com/giampaolo/psutil .. _psutil: https://github.com/giampaolo/psutil
.. _README: https://github.com/nicolargo/glances/blob/master/README.rst .. _README: https://github.com/nicolargo/glances/blob/master/README.rst

View File

@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
.. ..
.TH "GLANCES" "1" "Mar 22, 2025" "4.3.1" "Glances" .TH "GLANCES" "1" "Apr 11, 2025" "4.3.2_dev01" "Glances"
.SH NAME .SH NAME
glances \- An eye on your system glances \- An eye on your system
.SH SYNOPSIS .SH SYNOPSIS
@ -64,6 +64,11 @@ enable debug mode
.UNINDENT .UNINDENT
.INDENT 0.0 .INDENT 0.0
.TP .TP
.B \-\-print\-completion
generate shell tab completion scripts for Glances CLI
.UNINDENT
.INDENT 0.0
.TP
.B \-C CONF_FILE, \-\-config CONF_FILE .B \-C CONF_FILE, \-\-config CONF_FILE
path to the configuration file path to the configuration file
.UNINDENT .UNINDENT