pub enum PromptPiece {
Show 23 variants
AsciiCharacter(u32),
Backslash,
BellCharacter,
CarriageReturn,
CurrentCommandNumber,
CurrentHistoryNumber,
CurrentUser,
CurrentWorkingDirectory {
tilde_replaced: bool,
basename: bool,
},
Date(PromptDateFormat),
DollarOrPound,
EndNonPrintingSequence,
EscapeCharacter,
EscapedSequence(String),
Hostname {
only_up_to_first_dot: bool,
},
Literal(String),
Newline,
NumberOfManagedJobs,
ShellBaseName,
ShellRelease,
ShellVersion,
StartNonPrintingSequence,
TerminalDeviceBaseName,
Time(PromptTimeFormat),
}Expand description
A piece of a prompt string.
Variants§
AsciiCharacter(u32)
An ASCII character.
Backslash
A backslash character.
BellCharacter
The bell character.
CarriageReturn
A carriage return character.
CurrentCommandNumber
The current command number.
CurrentHistoryNumber
The current history number.
CurrentUser
The name of the current user.
CurrentWorkingDirectory
Path to the current working directory.
Fields
Date(PromptDateFormat)
The current date, using the given format.
DollarOrPound
The dollar or pound character.
EndNonPrintingSequence
Special marker indicating the end of a non-printing sequence of characters.
EscapeCharacter
The escape character.
EscapedSequence(String)
An escaped sequence not otherwise recognized.
Hostname
The hostname of the system.
Literal(String)
A literal string.
Newline
A newline character.
NumberOfManagedJobs
The number of actively managed jobs.
ShellBaseName
The base name of the shell.
ShellRelease
The release of the shell.
ShellVersion
The version of the shell.
StartNonPrintingSequence
Special marker indicating the start of a non-printing sequence of characters.
TerminalDeviceBaseName
The base name of the terminal device.
Time(PromptTimeFormat)
The current time, using the given format.
Trait Implementations§
Source§impl Clone for PromptPiece
impl Clone for PromptPiece
Source§fn clone(&self) -> PromptPiece
fn clone(&self) -> PromptPiece
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more