Skip to main content

generate_init_script

Function generate_init_script 

Source
pub fn generate_init_script(
    fs: &dyn Fs,
    paths: &dyn Pather,
    profiling_enabled: bool,
) -> Result<String>
Expand description

Generate the shell init script content from the current datastore state.

Scans the datastore for:

  • packs/*/shell/* — symlinks to shell scripts → source lines
  • packs/*/path/* — symlinks to directories → PATH= lines

When profiling_enabled is true and there is at least one entry to emit, the script also carries the per-line timing wrapper described in the module docs.