aboutsummaryrefslogtreecommitdiffstats
path: root/src/command
diff options
context:
space:
mode:
authorConrad Ludgate <conrad.ludgate@truelayer.com>2022-04-22 19:24:38 +0100
committerGitHub <noreply@github.com>2022-04-22 19:24:38 +0100
commit02c70deecba955c1b01f661ed7a709038e90addc (patch)
treefc6881b607120cdb97991e17142b2e3159bff759 /src/command
parentAdded docker-compose.yml (#325) (diff)
downloadatuin-02c70deecba955c1b01f661ed7a709038e90addc.zip
refactor (#327)
Diffstat (limited to 'src/command')
-rw-r--r--src/command/client/history.rs4
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");