From 504400673f7cd3c958bfe110aa788aa935059975 Mon Sep 17 00:00:00 2001 From: Chandra Kiran G Date: Fri, 29 Sep 2023 18:53:09 +0530 Subject: add --reverse to history list (#1252) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * wip: add --reverse to history list * fix: remove print_list being called twice when reverse=true * chore: update documentation * feat: Avoid unneeded reverse by iterate forward or backward instead * feat: Make sure to only iterate once and avoid unneeded reverse call * feat: It used to be reverse by default. So make it default true here to be backwards compatible * fix clap --------- Co-authored-by: Dieter Eickstädt --- docs/docs/commands/list.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/docs/commands/list.md b/docs/docs/commands/list.md index c48d9d0a..4d4f2a97 100644 --- a/docs/docs/commands/list.md +++ b/docs/docs/commands/list.md @@ -11,6 +11,7 @@ title: Listing History | `--session`/`-s` | Enable listing history for the current session only (default: false) | | `--human` | Use human-readable formatting for the timestamp and duration (default: false) | | `--cmd-only` | Show only the text of the command (default: false) | +| `--reverse` | Reverse the order of the output (default: false) | | `--format` | Specify the formatting of a command (see below) | ## Format -- cgit v1.3.1