Skip to content

odoo-work-cli completion

NAME

odoo-work-cli-completion - Generate the autocompletion script for the specified shell

SYNOPSIS

odoo-work-cli completion bash [--no-descriptions]
odoo-work-cli completion fish [--no-descriptions]
odoo-work-cli completion powershell [--no-descriptions]
odoo-work-cli completion zsh [--no-descriptions]

DESCRIPTION

Print the shell completion script of odoo-work-cli for bash, zsh, fish or PowerShell on standard output. It completes commands and flags.

The Homebrew cask installs the scripts for bash, zsh and fish; the release archives contain them in completions/. Load a script by hand as shown for each shell below.

bash

Generate the autocompletion script for the bash shell.

This script depends on the 'bash-completion' package. If it is not installed already, you can install it via your OS's package manager.

To load completions in your current shell session:

source <(odoo-work-cli completion bash)

To load completions for every new session, execute once:

Linux:

odoo-work-cli completion bash > /etc/bash_completion.d/odoo-work-cli

macOS:

odoo-work-cli completion bash > $(brew --prefix)/etc/bash_completion.d/odoo-work-cli

You will need to start a new shell for this setup to take effect.

fish

Generate the autocompletion script for the fish shell.

To load completions in your current shell session:

odoo-work-cli completion fish | source

To load completions for every new session, execute once:

odoo-work-cli completion fish > ~/.config/fish/completions/odoo-work-cli.fish

You will need to start a new shell for this setup to take effect.

powershell

Generate the autocompletion script for powershell.

To load completions in your current shell session:

odoo-work-cli completion powershell | Out-String | Invoke-Expression

To load completions for every new session, add the output of the above command to your powershell profile.

zsh

Generate the autocompletion script for the zsh shell.

If shell completion is not already enabled in your environment you will need to enable it. You can execute the following once:

echo "autoload -U compinit; compinit" >> ~/.zshrc

To load completions in your current shell session:

source <(odoo-work-cli completion zsh)

To load completions for every new session, execute once:

Linux:

odoo-work-cli completion zsh > "${fpath[1]}/_odoo-work-cli"

macOS:

odoo-work-cli completion zsh > $(brew --prefix)/share/zsh/site-functions/_odoo-work-cli

You will need to start a new shell for this setup to take effect.

OPTIONS

--no-descriptions

Disable completion descriptions.

flag; optional

GLOBAL OPTIONS

--backend BACKEND

BACKEND: odoo or fake (offline, made-up data; env ODOO_WORK_CLI_BACKEND).

string; optional; default: odoo; env: ODOO_WORK_CLI_BACKEND

--config FILE

Read only the config FILE (skip discovery).

string; optional

-h, --help
Print the help of the command and exit.

EXIT STATUS

0 on success, 1 on any error, including usage errors. The error is printed as "Error: TEXT" on standard error.

Error kinds this command can fail with:

validation
Invalid input: unknown flag, bad argument, malformed date, time or hours, a time in the future, an unknown project.
internal
Anything else: an unexpected Odoo response or a bug.

EXAMPLES

Load completion into the current zsh session:

$ source <(odoo-work-cli completion zsh)

Install it for every new bash session (Linux):

$ odoo-work-cli completion bash > /etc/bash_completion.d/odoo-work-cli

SEE ALSO