Skip to content

completion

Generate the autocompletion script for fns-cli for your shell.

Usage

fns-cli completion [command]

Subcommands

SubcommandDescription
bashGenerate autocompletion script for Bash
zshGenerate autocompletion script for Zsh
fishGenerate autocompletion script for Fish
powershellGenerate autocompletion script for PowerShell

Flags

FlagDescription
--no-descriptionsDisable completion descriptions
-h, --helpShow help

Bash

Requires the bash-completion package. Install it via your OS package manager if not already present.

Load for current session:

bash
source <(fns-cli completion bash)

Load permanently on Linux:

bash
fns-cli completion bash > /etc/bash_completion.d/fns-cli

Load permanently on macOS:

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

Zsh

Enable shell completion (once, if not already enabled):

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

Load for current session:

zsh
source <(fns-cli completion zsh)

Load permanently on Linux:

zsh
fns-cli completion zsh > "${fpath[1]}/_fns-cli"

Load permanently on macOS:

zsh
fns-cli completion zsh > $(brew --prefix)/share/zsh/site-functions/_fns-cli

Fish

Load for current session:

fish
fns-cli completion fish | source

Load permanently:

fish
fns-cli completion fish > ~/.config/fish/completions/fns-cli.fish

PowerShell

Load for current session:

powershell
fns-cli completion powershell | Out-String | Invoke-Expression

Load permanently: Add the output of the above command to your PowerShell profile.


Start a new shell session after any permanent installation for the changes to take effect.