pub struct HistoryEntry {
pub shell: Shell,
pub command: String,
pub timestamp: Option<i64>,
pub elapsed: Option<i64>,
pub paths: Vec<String>,
}Expand description
One command-history entry, normalized across shells.
Fields§
§shell: ShellThe shell this entry was decoded from.
command: StringThe command text (multi-line commands keep their embedded newlines).
timestamp: Option<i64>Start time as Unix epoch seconds, when the format records it (bash with
HISTTIMEFORMAT, zsh EXTENDED_HISTORY, fish). None for plain bash and
PowerShell PSReadLine, which store no timestamps.
elapsed: Option<i64>Wall-clock duration in seconds (zsh EXTENDED_HISTORY only).
paths: Vec<String>Filesystem paths fish heuristically associated with the command.
Trait Implementations§
Source§impl Clone for HistoryEntry
impl Clone for HistoryEntry
Source§fn clone(&self) -> HistoryEntry
fn clone(&self) -> HistoryEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HistoryEntry
impl Debug for HistoryEntry
impl Eq for HistoryEntry
Source§impl PartialEq for HistoryEntry
impl PartialEq for HistoryEntry
Source§fn eq(&self, other: &HistoryEntry) -> bool
fn eq(&self, other: &HistoryEntry) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for HistoryEntry
Auto Trait Implementations§
impl Freeze for HistoryEntry
impl RefUnwindSafe for HistoryEntry
impl Send for HistoryEntry
impl Sync for HistoryEntry
impl Unpin for HistoryEntry
impl UnsafeUnpin for HistoryEntry
impl UnwindSafe for HistoryEntry
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