On this page

Set up shell completions 🔗

Deder completes commands, flags, module ids and task names when you press TAB. deder complete -s <shell> -o prints the completion script for your shell, you install it once.

Generating the script works in any directory, it doesn't need a project or a running server.

Bash 🔗

Requires the bash-completion package (on macOS: brew install bash-completion@2).

mkdir -p ~/.local/share/bash-completion/completions
deder complete -s bash -o > ~/.local/share/bash-completion/completions/deder

Zsh 🔗

Put the script in a directory on your fpath, named _deder:

mkdir -p ~/.zsh/completions
deder complete -s zsh -o > ~/.zsh/completions/_deder

Then make sure your ~/.zshrc adds that directory to fpath before compinit runs:

fpath=(~/.zsh/completions $fpath)
autoload -Uz compinit && compinit

If you use a framework like Oh My Zsh, which calls compinit itself, put the fpath line before it is loaded. If completions don't show up, remove the stale cache with rm -f ~/.zcompdump* and open a new shell.

Fish 🔗

Fish loads completions from its completions directory automatically:

deder complete -s fish -o > ~/.config/fish/completions/deder.fish

PowerShell 🔗

Save the script and load it from your profile:

deder complete -s powershell -o > ~/deder-completion.ps1
Add-Content $PROFILE '. ~/deder-completion.ps1'

Try it 🔗

Open a new shell, then:

deder <TAB>            # commands: exec, modules, tasks, ...
deder exec -m <TAB>    # module ids of the project
deder exec -t comp<TAB> # task names

Command names complete anywhere, instantly. Module ids, task names and flags come from the Deder server of the project, so they only complete inside a project (a directory with deder.pkl). If the server isn't running yet, the first such TAB starts it, which takes a few seconds.

Updating 🔗

The script only calls deder complete, so it keeps working when you upgrade Deder. You don't need to regenerate it after upgrades.

⬅️ Clean output artifacts Plugins ➡️