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

init

Output shell initialization script.

Usage

scoop init <shell>

Arguments

ArgumentRequiredDescription
shellYesShell type: bash, zsh, fish, powershell

Setup

Add to your shell configuration:

# Bash (~/.bashrc)
eval "$(scoop init bash)"

# Zsh (~/.zshrc)
eval "$(scoop init zsh)"
# Fish (~/.config/fish/config.fish)
eval (scoop init fish)

Features Enabled

  • Auto-activation when entering directories with .scoop-version
  • Tab completion for commands, environments, and options
  • Wrapper function for activate/deactivate/use

Examples

scoop init bash                  # Output bash init script
scoop init zsh                   # Output zsh init script
scoop init fish                  # Output fish init script