1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#[cfg(feature = "tmux_3_3")]
use std::fmt;

#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
#[cfg(feature = "tmux_3_3")]
pub enum PromptType {
    /// `command`
    Command,
    /// `search`
    Search,
    /// `target`
    Target,
    /// `window-target`
    WindowTarget,
}

#[cfg(feature = "tmux_3_3")]
impl fmt::Display for PromptType {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        let s = match self {
            PromptType::Command => "command",
            PromptType::Search => "search",
            PromptType::Target => "target",
            PromptType::WindowTarget => "window-target",
        };

        write!(f, "{}", s)
    }
}