pub const NAVIGATE: &str = "↑↓ select";
pub const APPLY: &str = "Enter apply";
pub const ADJUST: &str = "←→ value";
pub const FILTER: &str = "type to filter";
pub const BACK: &str = "Esc back";
pub const CANCEL: &str = "Esc cancel";
pub const MOVE_VIM: &str = "↑↓/jk move";
pub const ENDS: &str = "Home/End";
pub const CONFIRM: &str = "Enter confirm";
pub const CLEAR_OR_CANCEL: &str = "Esc clear/cancel";
const SEP: &str = " · ";
pub fn list_hint() -> String {
[NAVIGATE, APPLY, ADJUST, FILTER, BACK].join(SEP)
}
pub fn choice_hint() -> String {
[MOVE_VIM, ENDS, CONFIRM, CLEAR_OR_CANCEL].join(SEP)
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn list_hint_includes_filter_and_back() {
let hint = list_hint();
assert!(hint.contains(FILTER));
assert!(hint.contains(BACK));
assert!(hint.contains(NAVIGATE));
}
#[test]
fn choice_hint_matches_standalone_picker_verb_set() {
let hint = choice_hint();
assert!(hint.contains(MOVE_VIM));
assert!(hint.contains(CLEAR_OR_CANCEL));
}
}