Skip to content

hk completion ​

  • Usage: hk completion [--install] [--force] <SHELL>
  • Effect: read-only

Generate shell completion scripts

Arguments ​

  • <SHELL> — The shell to generate completion for

Flags ​

  • --install — Install the script where this shell looks for it, instead of printing it

    Writes the script file and nothing else: no shell rc file and no PowerShell profile is edited. Where a shell needs a one-time line of its own — zsh's fpath+=, PowerShell's dot-source — it is printed for you to add.

    Effect: modifies state

  • --force — Replace a file at the target path that hk did not write

    Effect: modifies state

  • -h --help — Print help

Examples ​

Generate a completion script, or install it in the location used by your shell. hk prints any remaining shell setup instructions.

sh
hk completion bash
hk completion zsh --install
hk completion fish --install

Learn more ​

Getting started · Troubleshooting · All commands

MIT LicenseCopyright © 2026jdx.dev