Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Shell Completion

Shell completion scripts for Bash, Elvish, Fish, PowerShell, and Zsh are available in release archives.

The filepack binary can also generate the same completion scripts at runtime using filepack completions SHELL:

filepack completions bash

Bash

The recommended approach is to use the bash-completions package to lazy-load the completion script:

mkdir -p ~/.local/share/bash-completion/completions
filepack completions bash > ~/.local/share/bash-completion/completions/filepack

If bash-completions is not installed, you can source the completion script in your .bashrc:

source <(filepack completions bash)

Elvish

In your rc.elv:

set edit:completion:arg-completer[filepack] = { |@args|
  eval (filepack completions elvish | slurp)
  set @result = (edit:completion:arg-completer[filepack] $@args)
  put $@result
}

Fish

Save the completion script to the completions directory to lazy-load it:

mkdir -p ~/.config/fish/completions
filepack completions fish > ~/.config/fish/completions/filepack.fish

PowerShell

In your PowerShell $PROFILE:

filepack completions powershell | Out-String | Invoke-Expression

Zsh

First save the completion script:

mkdir -p ~/.zsh/completions
filepack completions zsh > ~/.zsh/completions/_filepack

Then in your .zshrc:

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