pub fn upsert_managed_block(
bin_name: &str,
shell: Shell,
file_path: &Path,
block_body: &str,
) -> Result<()>Expand description
Inserts or replaces a managed shell configuration block in a startup file.
The managed block is identified by the binary name and shell, allowing repeat installs to update the same block instead of appending duplicates.
§Arguments
bin_name: Binary name used in the managed block markers.shell: Shell whose startup block is being inserted or replaced.file_path: Startup file to update.block_body: Shell-specific content placed between the managed markers.
§Returns
Returns Ok(()) after the startup file has been written.