diff options
| author | Conrad Ludgate <conrad.ludgate@truelayer.com> | 2022-04-22 19:24:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-22 19:24:38 +0100 |
| commit | 02c70deecba955c1b01f661ed7a709038e90addc (patch) | |
| tree | fc6881b607120cdb97991e17142b2e3159bff759 /src/command | |
| parent | Added docker-compose.yml (#325) (diff) | |
| download | atuin-02c70deecba955c1b01f661ed7a709038e90addc.zip | |
refactor (#327)
Diffstat (limited to '')
| -rw-r--r-- | src/command/client/history.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/command/client/history.rs b/src/command/client/history.rs index 6eaa6407..b2f68f93 100644 --- a/src/command/client/history.rs +++ b/src/command/client/history.rs @@ -55,7 +55,7 @@ pub enum Cmd { pub fn print_list(h: &[History], human: bool, cmd_only: bool) { let mut writer = TabWriter::new(std::io::stdout()).padding(2); - let lines = h.iter().map(|h| { + let lines = h.iter().rev().map(|h| { if human { let duration = humantime::format_duration(Duration::from_nanos(std::cmp::max( h.duration, 0, @@ -82,7 +82,7 @@ pub fn print_list(h: &[History], human: bool, cmd_only: bool) { } }); - for i in lines.rev() { + for i in lines { writer .write_all(i.as_bytes()) .expect("failed to write to tab writer"); |
