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§impl Debug for PromptPiece
impl Debug for PromptPiece
Source§impl<'de> Deserialize<'de> for PromptPiece
Available on crate features serde only.
impl<'de> Deserialize<'de> for PromptPiece
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for PromptPiece
serde only.Source§impl PartialEq for PromptPiece
Available on crate features serde only.
impl PartialEq for PromptPiece
serde only.Source§impl Serialize for PromptPiece
Available on crate features serde only.
impl Serialize for PromptPiece
serde only.impl StructuralPartialEq for PromptPiece
serde only.Auto Trait Implementations§
impl Freeze for PromptPiece
impl RefUnwindSafe for PromptPiece
impl Send for PromptPiece
impl Sync for PromptPiece
impl Unpin for PromptPiece
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.