diff --git a/src/operations.rs b/src/operations.rs index 9a78dbc5..d824340d 100644 --- a/src/operations.rs +++ b/src/operations.rs @@ -1050,6 +1050,8 @@ fn get_shell_script_juliaup_content(bin_path: &Path, path: &Path) -> Result, path_str: &str) { buf.extend_from_slice(content.as_bytes()); } +fn append_csh_content(buf: &mut Vec, path_str: &str) { + // csh specific syntax for path extension + let content = formatdoc!( + " + set path = ($path {}) + ", + path_str + ); + + buf.extend_from_slice(content.as_bytes()); +} + fn append_sh_content(buf: &mut Vec, path_str: &str) { // If the variable is already contained in $PATH, do nothing // Otherwise prepend it to path @@ -1209,6 +1223,8 @@ pub fn find_shell_scripts_to_be_modified(add_case: bool) -> Result> home_dir.join(".bash_profile"), home_dir.join(".bash_login"), home_dir.join(".zshrc"), + home_dir.join(".cshrc"), + home_dir.join(".tcshrc"), ]; let result = paths_to_test