pub fn push_to_history(&mut self, command: &str, is_builtin: bool) {
        let entry = if is_builtin {
            HistoryEntry::new(command.trim().to_string(), None, self.mode, true)
        } else {
            match self.mode {
                SessionMode::Wrapped => HistoryEntry::new(
                    command.trim().to_string(),
                    Some(self.get_base()),
                    self.mode,
                    is_builtin,
                ),
                SessionMode::Normal => {
                    HistoryEntry::new(command.trim().to_string(), None, self.mode, false)
                }
            }
        };

        self.history.push(entry);
    }
/// Push the given command to the back of the in-memory history stack.
///
/// If the given command is a builtin, it will be added as having no bas
/// command and SessionMode::Normal.
Push the given command to the back of the in-memory history stack.
If the given command is a builtin, it will be added as having no bas
command and SessionMode::Normal.
Push the given command to the back of the in - memory history stack . If the given command is a builtin it will be added as having no bas command and SessionMode :: Normal .
pub fn push_to_history(&mut self, command: &str, is_builtin: bool) {
        let entry = if is_builtin {
            HistoryEntry::new(command.trim().to_string(), None, self.mode, true)
        } else {
            match self.mode {
                SessionMode::Wrapped => HistoryEntry::new(
                    command.trim().to_string(),
                    Some(self.get_base()),
                    self.mode,
                    is_builtin,
                ),
                SessionMode::Normal => {
                    HistoryEntry::new(command.trim().to_string(), None, self.mode, false)
                }
            }
        };
        self.history.push(entry);
    }
pub fn push_to_history ( & mut self , command : & str , is_builtin : bool ) { let entry = if is_builtin { HistoryEntry :: new ( command . trim ( ) . to_string ( ) , None , self . mode , true ) } else { match self . mode { SessionMode :: Wrapped => HistoryEntry :: new ( command . trim ( ) . to_string ( ) , Some ( self . get_base ( ) ) , self . mode , is_builtin , ) , SessionMode :: Normal => { HistoryEntry :: new ( command . trim ( ) . to_string ( ) , None , self . mode , false ) } } } ; self . history . push ( entry ) ; }
Push the given command to the back of the in-memory history stack.
Push the given command to the back of the in - memory history stack .
&mut self
command
&str
is_builtin
bool