Struct tmux_interface::commands::status_line::command_prompt::CommandPrompt
source · pub struct CommandPrompt<'a> {
pub one_keypress: bool,
pub background: bool,
pub expand_as_format: bool,
pub on_input_change: bool,
pub key_name: bool,
pub numeric: bool,
pub prompt_type: Option<PromptType>,
pub for_window: bool,
pub inputs: Option<Cow<'a, str>>,
pub prompts: Option<Cow<'a, str>>,
pub target_client: Option<Cow<'a, str>>,
pub template: Option<Cow<'a, str>>,
}
Expand description
Structure for open the command prompt in a client
§Manual
tmux ^3.3:
command-prompt [-1bFikN] [-I inputs] [-p prompts] [-t target-client] [-T prompt-type] [template]
tmux ^3.2:
command-prompt [-1ikNTW] [-I inputs] [-p prompts] [-t target-client] [template]
tmux ^3.1:
command-prompt [-1ikN] [-I inputs] [-p prompts] [-t target-client] [template]
tmux ^3.0:
command-prompt [-1Ni] [-I inputs] [-p prompts] [-t target-client] [template]
tmux ^2.4:
command-prompt [-1i] [-I inputs] [-p prompts] [-t target-client] [template]
tmux ^1.5:
command-prompt [-I inputs] [-p prompts] [-t target-client] [template]
tmux ^1.0:
command-prompt [-p prompts] [-t target-client] [template]
tmux ^0.8:
command-prompt [-t target-client] [template]
Fields§
§one_keypress: bool
[-1]
- makes the prompt only accept one key press
background: bool
[-b]
- the prompt is shown in the background and the invoking client does not exit until it is dismissed
expand_as_format: bool
[-F]
-
on_input_change: bool
[-i]
execute the command every time the prompt input changes
key_name: bool
[-k]
- the key press is translated to a key name
numeric: bool
[-N]
- makes the prompt only accept numeric key presses
prompt_type: Option<PromptType>
[-T prompt-type]
- tells tmux the prompt type. This affects what completions are offered when Tab is pressed
for_window: bool
[-W]
- indicates the prompt is for a window.
inputs: Option<Cow<'a, str>>
[-I inputs]
- comma-separated list of the initial text for each prompt
prompts: Option<Cow<'a, str>>
[-p prompts]
- prompts is a comma-separated list of prompts which are displayed in order
target_client: Option<Cow<'a, str>>
[-t target-client]
- target-client
template: Option<Cow<'a, str>>
[template]
- template
Implementations§
source§impl<'a> CommandPrompt<'a>
impl<'a> CommandPrompt<'a>
pub fn new() -> Self
sourcepub fn one_keypress(self) -> Self
pub fn one_keypress(self) -> Self
[-1]
makesthe prompt only accept one key press
sourcepub fn on_input_change(self) -> Self
pub fn on_input_change(self) -> Self
[-i]
execute the command every time the prompt input changes
sourcepub fn prompt_type(self, prompt_type: PromptType) -> Self
pub fn prompt_type(self, prompt_type: PromptType) -> Self
[-T prompt-type]
sourcepub fn for_window(self) -> Self
pub fn for_window(self) -> Self
[-W]
- indicates the prompt is for a window.
sourcepub fn inputs<S: Into<Cow<'a, str>>>(self, inputs: S) -> Self
pub fn inputs<S: Into<Cow<'a, str>>>(self, inputs: S) -> Self
[-I inputs]
- comma-separated list of the initial text for each prompt
sourcepub fn prompts<S: Into<Cow<'a, str>>>(self, prompts: S) -> Self
pub fn prompts<S: Into<Cow<'a, str>>>(self, prompts: S) -> Self
[-p prompts]
- prompts is a comma-separated list of prompts which are displayed in order
sourcepub fn target_client<S: Into<Cow<'a, str>>>(self, target_client: S) -> Self
pub fn target_client<S: Into<Cow<'a, str>>>(self, target_client: S) -> Self
[-t target-client]
- target-client
pub fn build(self) -> TmuxCommand<'a>
Trait Implementations§
source§impl<'a> Clone for CommandPrompt<'a>
impl<'a> Clone for CommandPrompt<'a>
source§fn clone(&self) -> CommandPrompt<'a>
fn clone(&self) -> CommandPrompt<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'a> Debug for CommandPrompt<'a>
impl<'a> Debug for CommandPrompt<'a>
source§impl<'a> Default for CommandPrompt<'a>
impl<'a> Default for CommandPrompt<'a>
source§fn default() -> CommandPrompt<'a>
fn default() -> CommandPrompt<'a>
source§impl<'a> From<CommandPrompt<'a>> for TmuxCommand<'a>
impl<'a> From<CommandPrompt<'a>> for TmuxCommand<'a>
source§fn from(item: CommandPrompt<'a>) -> Self
fn from(item: CommandPrompt<'a>) -> Self
source§impl<'a> Hash for CommandPrompt<'a>
impl<'a> Hash for CommandPrompt<'a>
source§impl<'a> Ord for CommandPrompt<'a>
impl<'a> Ord for CommandPrompt<'a>
source§fn cmp(&self, other: &CommandPrompt<'a>) -> Ordering
fn cmp(&self, other: &CommandPrompt<'a>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl<'a> PartialEq for CommandPrompt<'a>
impl<'a> PartialEq for CommandPrompt<'a>
source§fn eq(&self, other: &CommandPrompt<'a>) -> bool
fn eq(&self, other: &CommandPrompt<'a>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialOrd for CommandPrompt<'a>
impl<'a> PartialOrd for CommandPrompt<'a>
source§fn partial_cmp(&self, other: &CommandPrompt<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &CommandPrompt<'a>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more