pueue-completions
Generate shell completion scripts for Pueue
TLDR
Generate completions for Bash
Generate completions for Zsh
Generate completions for fish
SYNOPSIS
pueue-completions [-o directory] SHELL
PARAMETERS
--help, -h
Prints help information for the command and exits.
--output, -o directory
Specifies an output directory where the completion file will be saved. If this option is omitted, the completion script will be printed to standard output.
--version, -V
Prints the version information of the pueue-completions utility and exits.
SHELL
The specific shell for which to generate completion scripts. Accepted values include: bash, elvish, fish, powershell, and zsh.
DESCRIPTION
pueue-completions is a specialized utility provided by the Pueue task manager, designed to enhance the command-line experience. Its core function is to generate shell completion scripts that provide auto-completion suggestions for Pueue commands, subcommands, and arguments. This feature significantly boosts user efficiency and reduces typing errors when interacting with Pueue from the terminal. The command supports generating completions for various popular shells, including Bash, Zsh, Fish, Elvish, and PowerShell. Users can choose to print the completion script directly to standard output for immediate use or specify an output directory to save the script to a file, facilitating integration into their shell's configuration. Implementing these completions typically involves sourcing the generated script within the shell's respective configuration file (e.g., .bashrc, .zshrc).
CAVEATS
- Manual Sourcing Required: The generated completion script is not automatically active. It needs to be explicitly sourced in your shell's configuration file (e.g., ~/.bashrc, ~/.zshrc) or placed in a directory loaded by your shell for completions.
- Shell-Specific Setup: The exact steps for installing and enabling completion scripts can vary slightly between different shells. Users should consult their shell's documentation for the recommended approach.
- Pueue Dependency: This command is part of the Pueue project and requires Pueue to be installed on the system to function.
INSTALLATION & USAGE EXAMPLES
To enable shell completions for Bash, you can generate the script and source it in your .bashrc or a file within a completion directory, for example:pueue-completions bash > ~/.config/bash_completion.d/pueue.bash
Then, add source ~/.config/bash_completion.d/pueue.bash
to your ~/.bashrc.
For Zsh, you typically place the generated script in one of your $fpath
directories:pueue-completions zsh > /usr/local/share/zsh/site-functions/_pueue
Ensure that /usr/local/share/zsh/site-functions (or your chosen directory) is part of your $fpath
environment variable.
If no output directory is specified (by omitting the -o option), the script is printed to standard output, allowing for direct piping to a file or immediate evaluation using eval
.
HISTORY
Pueue, including its pueue-completions utility, is an open-source project primarily developed in Rust. The inclusion of a dedicated completions generator reflects a modern command-line interface (CLI) design philosophy that prioritizes user convenience. This utility has been a standard part of the Pueue project, continuously developed to provide robust auto-completion features across various popular shells, thereby improving the overall user experience for the Pueue task runner.