Terminal Setup Guide

May 5, 2026 · View on GitHub

This guide provides quick links to set up FontGet completions in popular terminal emulators. Refer to the section that matches your terminal's current shell (e.g. Bash, Zsh, Powershell or Fish)

Table of Contents

Quick Start

Easiest method — detects your shell and installs completions

fontget completion --install

Works from any terminal once fontget is on your PATH.

Setup by Shell

Use the section for the shell you run (not the name of the terminal app).

PowerShell

Automatic installation (recommended):

fontget completion powershell --install

Current session only (before a permanent install):

fontget completion powershell | Out-String | Invoke-Expression

Bash {#bash}

Automatic installation (recommended):

fontget completion bash --install

Current session only:

source <(fontget completion bash)

Zsh {#zsh}

Automatic installation (recommended):

fontget completion zsh --install

Current session only:

source <(fontget completion zsh)

Zsh note: The installer prepends a short block to ~/.zshrc so ~/.zsh/completions is added to fpath before compinit (including Oh My Zsh, which runs compinit when oh-my-zsh.sh is sourced). If you installed an older FontGet that appended fpath at the end of .zshrc, remove that old block or run compinit again after fixing order.

Fish {#fish}

Fish loads completions from ~/.config/fish/completions/ automatically; no edit to config.fish is required.

Automatic installation (recommended):

fontget completion fish --install

Current session only:

fontget completion fish | source

Ensure fontget is on your PATH (which fontget).

Which shell am I using?

echo "$SHELL"

On macOS, Apple’s default login shell is zsh (Catalina 10.15 and later) and was bash on older releases. Your terminal app’s preferences may override the default.

On Windows, use PowerShell, Git Bash, or WSL—each matches one of the shell sections above.

Platform notes

Windows

  • Windows Terminal can host PowerShell, Command Prompt, or WSL—open the profile that matches how you use FontGet.
  • Command Prompt does not support these completions; use PowerShell or WSL instead.
  • Git Bash and WSL use Bash completions (Bash).

macOS

  • Login shells often read ~/.bash_profile instead of ~/.bashrc. If you installed Bash completions but they never load, ensure ~/.bashrc is sourced from ~/.bash_profile (e.g. [[ -f ~/.bashrc ]] && source ~/.bashrc).

Any terminal emulator

There is nothing special to configure per app (Kitty, iTerm2, Alacritty, WezTerm, etc.). Pick PowerShell, Bash, Zsh, or Fish according to the shell your profile runs.

Clickable URLs (OSC 8): Commands such as fontget info render http/https links using terminal hyperlinks. In supporting terminals (e.g. recent Windows Terminal, iTerm2, Kitty, WezTerm, Ghostty), you can ctrl+click (or cmd+click) the underlined URL to open it in a browser. Other terminals still show the URL with normal styling; behavior depends on the emulator.

Troubleshooting

If completions are not working:

  1. Verify installation:

    ls ~/.fontget-completion.bash
    ls ~/.zsh/completions/_fontget
    ls ~/.config/fish/completions/fontget.fish
    
  2. Check shell configuration:

    grep "fontget" ~/.bashrc
    grep "fontget" ~/.zshrc
    

    Fish does not need a source line; the file under ~/.config/fish/completions/ is enough.

  3. Reload your shell:

    source ~/.bashrc   # Bash
    source ~/.zshrc    # Zsh
    

    Or restart the terminal. See Platform notes for login-shell behavior on macOS.

  4. Confirm FontGet is on your PATH:

    which fontget
    fontget version
    
  5. Watch for errors when sourcing or running completion commands.

PowerShell-specific issues

  1. Profile not loading:

    Test-Path $PROFILE
    if (!(Test-Path $PROFILE)) {
        New-Item -Path $PROFILE -Type File -Force
    }
    
  2. Execution policy:

    Get-ExecutionPolicy
    # If needed (may require admin):
    Set-ExecutionPolicy RemoteSigned
    

Zsh-specific issues

  1. Completion system not initialized:

    grep "compinit" ~/.zshrc
    echo "autoload -Uz compinit && compinit" >> ~/.zshrc
    
  2. fpath after compinit: Current FontGet installs prepend a block tagged fontget: zsh completion fpath at the top of ~/.zshrc. If you still see no completions, remove any old fpath line FontGet appended at the bottom of the file, open a new terminal, or run rm -f ~/.zcompdump* && compinit once.

Fish-specific issues

  1. Completion file missing or stale: Re-run fontget completion fish --install, or remove ~/.config/fish/completions/fontget.fish and install again.

Additional Resources


Contributing

Improvements to shell- or platform-specific notes are welcome via pull request.