Skip to main content

strip_atomcode_path_block

Function strip_atomcode_path_block 

Source
pub fn strip_atomcode_path_block(content: &str, prefix: &str) -> Option<String>
Expand description

Remove the canonical # Added by AtomCode installer\nexport PATH="<prefix>:$PATH" block(s) from a shell rc file’s content. Strict matching: requires both the comment and the export line targeting prefix. User-written PATH lines without the comment are left alone.

Returns Some(new_content) if at least one block was removed, None otherwise.