Get editor with default fallback
()
| 62 | |
| 63 | /// Get editor with default fallback |
| 64 | pub fn get_editor() -> String { |
| 65 | Env::new().get(EDITOR).unwrap_or_else(|_| "vi".to_string()) |
| 66 | } |
| 67 | |
| 68 | /// Try to get editor without fallback |
| 69 | pub fn try_get_editor() -> Result<String, std::env::VarError> { |
no test coverage detected