MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / get_editor

Function get_editor

crates/chat-cli/src/util/env_var.rs:64–66  ·  view source on GitHub ↗

Get editor with default fallback

()

Source from the content-addressed store, hash-verified

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

Callers 2

launch_editorFunction · 0.85
launch_editorFunction · 0.85

Calls 2

to_stringMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected