Skip to content

Command-line usage

brush is a bash-compatible, Rust-implemented, POSIX-style shell.

brush is distributed under the terms of the MIT license. If you encounter any issues or discrepancies in behavior from bash, please report them at https://github.com/reubeno/brush.

For more information, visit https://brush.sh.

Usage: brush [OPTIONS]... [SCRIPT_PATH [SCRIPT_ARGS]...]

  • <SCRIPT_PATH [SCRIPT_ARGS]...> — Path and arguments for script to execute (optional)
  • --help — Display usage information

    Possible values: true, false

  • --version — Display shell version

    Possible values: true, false

  • --config <FILE> — Path to TOML-based brush config file (overrides default location)

  • --no-config — Disable loading of TOML-based brush config file

  • -C — Enable noclobber shell option

  • -c <COMMAND> — Execute the provided command and then exit

  • -e — Enable error-on-exit behavior

  • -f — Disable pathname expansion (also known as filename globbing)

  • -i — Run in interactive mode

  • --inherit-fd <FD> — Inherit the specified file descriptors injected by the parent process

  • -l, --login — Make shell act as if it had been invoked as a login shell

  • -n — Do not execute commands

  • --noediting — Don’t use readline for input

  • --noprofile — Don’t process any profile/login files (/etc/profile, ~/.bash_profile, ~/.bash_login, ~/.profile)

  • --norc — Don’t process “rc” files if the shell is interactive (e.g., ~/.bashrc, ~/.brushrc)

  • --noenv — Don’t inherit environment variables from the calling process

  • -o <OPTION> — Enable option (set -o option)

  • -O <SHOPT_OPTION> — Enable shopt option

  • --posix — Disable non-POSIX extensions

  • --rcfile <FILE> — Path to the rc file to load in interactive shells (instead of bash.bashrc and ~/.bashrc)

  • -s — Read commands from standard input

  • --sh — Run in sh compatibility mode, as if run as /bin/sh

  • -t — Run only one command and then exit

  • -u — Treat expansion of an unset variable as an error

  • -v, --verbose — Print input when it’s processed

  • -x — Print commands as they execute

  • --xtrace-file <FILE> — Enable xtrace and configure for the given output file

  • --disable-bracketed-paste — Disable bracketed paste

  • --disable-color — Disable colorized output

  • --enable-highlighting — Enable syntax highlighting in input

    Default value: false

  • --enable-terminal-integration — Enable terminal integration (experimental)

  • --enable-zsh-hooks — Enable zsh-style preexec/precmd hooks (experimental)

  • --input-backend <BACKEND> — Input backend

    Possible values:

    • reedline: Richest input backend, based on reedline
    • basic: Basic input backend that provides minimal completion support for testing
    • minimal: Most minimal input backend
  • --debug <EVENT> — Enable debug logging for classes of tracing events

    Possible values:

    • arithmetic: Traces parsing and evaluation of arithmetic expressions
    • commands: Traces command execution
    • complete: Traces command completion generation
    • expand: Traces word expansion
    • functions: Traces functions
    • input: Traces input controls
    • jobs: Traces job management
    • parse: Traces the process of parsing tokens into an abstract syntax tree
    • pattern: Traces pattern matching
    • tokenize: Traces the process of tokenizing input text
    • unimplemented: Traces usage of unimplemented functionality
  • --disable-event <EVENT> — Disable logging for classes of tracing events (takes same event types as --debug)

    Possible values:

    • arithmetic: Traces parsing and evaluation of arithmetic expressions
    • commands: Traces command execution
    • complete: Traces command completion generation
    • expand: Traces word expansion
    • functions: Traces functions
    • input: Traces input controls
    • jobs: Traces job management
    • parse: Traces the process of parsing tokens into an abstract syntax tree
    • pattern: Traces pattern matching
    • tokenize: Traces the process of tokenizing input text
    • unimplemented: Traces usage of unimplemented functionality

Generated from the brush v0.4.0 release.

Last updated:

Open source under the MIT license. Built in the open by the brush community.