(value: &str)
| 147 | } |
| 148 | |
| 149 | fn sanitize_name(value: &str) -> String { |
| 150 | value |
| 151 | .chars() |
| 152 | .map(|ch| { |
| 153 | if ch.is_ascii_alphanumeric() || matches!(ch, '.' | '-' | '_') { |
| 154 | ch |
| 155 | } else { |
| 156 | '_' |
| 157 | } |
| 158 | }) |
| 159 | .collect() |
| 160 | } |
| 161 | |
| 162 | fn xdg_config_dir() -> Result<PathBuf> { |
| 163 | openshell_core::paths::xdg_config_dir() |
no outgoing calls
no test coverage detected