For the complete documentation index, see llms.txt. This page is also available as Markdown.

Shell Completion

Dasel can generate shell completion scripts for Bash, Zsh, Fish, and PowerShell. These scripts provide tab-completion for subcommands, flags, and supported data formats.

Bash

# Add to ~/.bashrc
source <(dasel completion bash)

Or save to a file:

dasel completion bash > /etc/bash_completion.d/dasel

Zsh

# Add to ~/.zshrc
source <(dasel completion zsh)

Or save to a file:

dasel completion zsh > "${fpath[1]}/_dasel"

You may need to run compinit after adding the completion script for the first time.

Fish

dasel completion fish | source

Or save to a file:

PowerShell

Or save to a file:

What Gets Completed

The completion scripts provide tab-completion for:

  • Subcommands (query, version, completion, man, etc.)

  • Flags (--in, --out, --compact, --root, etc.)

  • Data formats when using --in or --out (e.g. json, yaml, toml, csv, xml)

  • Shell names when using dasel completion

Last updated