pub enum PromptPiece {
Show 22 variants
AsciiCharacter(u32),
Backslash,
BellCharacter,
CarriageReturn,
CurrentCommandNumber,
CurrentHistoryNumber,
CurrentUser,
CurrentWorkingDirectory {
tilde_replaced: bool,
basename: bool,
},
Date(PromptDateFormat),
DollarOrPound,
EndNonPrintingSequence,
EscapeCharacter,
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.
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
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PromptPiece
impl RefUnwindSafe for PromptPiece
impl Send for PromptPiece
impl Sync for PromptPiece
impl Unpin for PromptPiece
impl UnwindSafe for PromptPiece
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more