Starship Prompt Builder

Direnv module

Shows whether the current directory's .envrc is loaded and allowed

When it appears

This module is disabled by default. Enable it, then it renders when Starship detects the matching context.

Preview

Rendered from the starting configuration in a representative simulated environment.

starship — preview
direnv loaded/allowed 

Starting configuration

[direnv]
disabled = false
format = "[$symbol$loaded/$allowed]($style) "
symbol = "direnv "
style = "bold bright-yellow"
Open in the builder

The configuration is compressed into the URL fragment and stays in your browser.

Key options

formatstring
The format for the module.
symbolstring
The symbol used before displaying the direnv context.
stylestring
The style for the module.
disabledboolean
Disables the direnv module.
detect_extensionsarray
Which extensions should trigger this module.
detect_env_varsarray
Which environment variables should trigger this module.
detect_filesarray
Which filenames should trigger this module.
detect_foldersarray
Which folders should trigger this module.
allowed_msgstring
The message displayed when an rc file is allowed.
not_allowed_msgstring
The message displayed when an rc file is not_allowed.
denied_msgstring
The message displayed when an rc file is denied.
loaded_msgstring
The message displayed when an rc file is loaded.
unloaded_msgstring
The message displayed when an rc file is not loaded.

Format variables

$allowed
Whether the current rc file is allowed.
$loaded
Whether the current rc file is loaded.
$rc_path
The current rc file path.
$style
Mirrors the value of option style.
$symbol
Mirrors the value of option symbol.

Common adjustments

  • Tune the detection options if this module appears in the wrong projects or misses the right ones.
  • Edit format to reorder its variables or make surrounding text conditional.
  • Adjust its style options to fit the palette used by the rest of the prompt.