Skip to main content

swap_envrc

Function swap_envrc 

Source
pub fn swap_envrc(text: &str, sync_line: &str) -> Option<String>
Expand description

Rewrite an .envrc so the sync line replaces the invocation.

Every line naming the predecessor invocation goes, and the sync line takes the first removed line’s place unless the file already carries one. Every other line is byte-identical. None where no line names the invocation.