1pub const NAVIGATE: &str = "↑↓ select";
9pub const APPLY: &str = "Enter apply";
11pub const ADJUST: &str = "←→ value";
13pub const FILTER: &str = "type to filter";
15pub const BACK: &str = "Esc back";
17pub const CANCEL: &str = "Esc cancel";
19pub const MOVE_VIM: &str = "↑↓/jk move";
21pub const ENDS: &str = "Home/End";
23pub const CONFIRM: &str = "Enter confirm";
25pub const CLEAR_OR_CANCEL: &str = "Esc clear/cancel";
27
28const SEP: &str = " · ";
29
30pub fn list_hint() -> String {
32 [NAVIGATE, APPLY, ADJUST, FILTER, BACK].join(SEP)
33}
34
35pub fn choice_hint() -> String {
37 [MOVE_VIM, ENDS, CONFIRM, CLEAR_OR_CANCEL].join(SEP)
38}
39
40#[cfg(test)]
41mod tests {
42 use super::*;
43
44 #[test]
45 fn list_hint_includes_filter_and_back() {
46 let hint = list_hint();
47 assert!(hint.contains(FILTER));
48 assert!(hint.contains(BACK));
49 assert!(hint.contains(NAVIGATE));
50 }
51
52 #[test]
53 fn choice_hint_matches_standalone_picker_verb_set() {
54 let hint = choice_hint();
55 assert!(hint.contains(MOVE_VIM));
56 assert!(hint.contains(CLEAR_OR_CANCEL));
57 }
58}