ttx 0.1.0
Loading...
Searching...
No Matches
ttx::terminal::Command Struct Reference

Represents a completed annotated command via OSC 133. More...

#include <ttx/terminal/semantic_prompt.h>

Public Member Functions

auto operator== (Command const &) const -> bool=default
 

Public Attributes

di::String application_id
 Application id of the command.
 
PromptClickMode prompt_click_mode { PromptClickMode::None }
 Prompt click mode.
 
PromptKind prompt_kind { PromptKind::Initial }
 Prompt kind - for now we only support a single prompt region.
 
bool prompt_redraw { true }
 Does the application redraw the prompt?
 
AbsolutePosition prompt_start { 0 }
 Absolute position marking the prompt start.
 
AbsolutePosition prompt_end { 0 }
 Absolute position marking the prompt end (inclusive)
 
AbsolutePosition output_start { 0 }
 Absolute position marking the command output start.
 
AbsolutePosition output_end { 0 }
 Absolute position marking the command output end (exclusive)
 
u32 depth { 0 }
 Level of nesting within other commands.
 
bool failed { false }
 Did the command exit successfully?
 
bool ended { false }
 Has the command been completed?
 

Friends

constexpr friend auto tag_invoke (di::Tag< di::reflect >, di::InPlaceType< Command >)
 

Detailed Description

Represents a completed annotated command via OSC 133.

The completed command consists of regions of lines corresponding to the command output, shell prompt, and user input. We also subshells by assigning a depth of the command.

Member Function Documentation

◆ operator==()

auto ttx::terminal::Command::operator== ( Command const & ) const -> bool=default
default

Friends And Related Symbol Documentation

◆ tag_invoke

friend auto tag_invoke ( di::Tag< di::reflect > ,
di::InPlaceType< Command >  )
friend

Member Data Documentation

◆ application_id

di::String ttx::terminal::Command::application_id

Application id of the command.

◆ depth

u32 ttx::terminal::Command::depth { 0 }

Level of nesting within other commands.

◆ ended

bool ttx::terminal::Command::ended { false }

Has the command been completed?

◆ failed

bool ttx::terminal::Command::failed { false }

Did the command exit successfully?

◆ output_end

AbsolutePosition ttx::terminal::Command::output_end { 0 }

Absolute position marking the command output end (exclusive)

◆ output_start

AbsolutePosition ttx::terminal::Command::output_start { 0 }

Absolute position marking the command output start.

◆ prompt_click_mode

PromptClickMode ttx::terminal::Command::prompt_click_mode { PromptClickMode::None }

Prompt click mode.

◆ prompt_end

AbsolutePosition ttx::terminal::Command::prompt_end { 0 }

Absolute position marking the prompt end (inclusive)

◆ prompt_kind

PromptKind ttx::terminal::Command::prompt_kind { PromptKind::Initial }

Prompt kind - for now we only support a single prompt region.

◆ prompt_redraw

bool ttx::terminal::Command::prompt_redraw { true }

Does the application redraw the prompt?

◆ prompt_start

AbsolutePosition ttx::terminal::Command::prompt_start { 0 }

Absolute position marking the prompt start.


The documentation for this struct was generated from the following file: