From b6502f03938405d7e9bfbe9dd5a3e7a60ab52edf Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Sun, 27 Jul 2025 20:23:38 -0400 Subject: [PATCH] feat: add more aliases --- README.md | 11 ++++++----- src/main.rs | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 7875e7b..64f14cd 100644 --- a/README.md +++ b/README.md @@ -51,12 +51,13 @@ mise use -g cargo:ldr ### Command aliases -- `add` can also be used as `prepend` -- `ls` can also be used as `list` -- `up` can also be used as `prioritize` -- `do` can also be used as `done`, `finish`, or `check` +- `add` can also be used as `a` or `prepend` +- `ls` can also be used as `l` or `list` +- `up` can also be used as `u` or `prioritize` +- `do` can also be used as `d`, `done`, `finish`, or `check` - `rm` can also be used as `remove`, `delete`, `destroy`, or `forget` -- `scan` can also be used as `review` +- `scan` can also be used as `s`, `r`, or `review` +- `edit` can also be used as `e` ## License diff --git a/src/main.rs b/src/main.rs index 7bbd154..c542003 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,13 +28,13 @@ struct Cli { #[derive(Subcommand)] enum Commands { /// Add a new item at the top - #[command(alias = "prepend")] + #[command(aliases = ["a", "prepend"])] Add { /// The text to add (e.g., "Read: Book XYZ") text: String, }, /// List the top N items (default 5) - #[command(alias = "list")] + #[command(aliases = ["l", "list"])] Ls { #[arg(short = 'n', long = "num", default_value_t = 5)] num: usize, @@ -45,13 +45,13 @@ enum Commands { filter: Option, }, /// Raise the priority of items (move toward top) - #[command(alias = "prioritize")] + #[command(aliases = ["u", "prioritize"])] Up { /// Item numbers to prioritize (from "ldr ls") numbers: Vec, }, /// Archive completed items - #[command(aliases = ["done", "finish", "check"])] + #[command(aliases = ["d", "done", "finish", "check"])] Do { /// Item numbers to archive (from "ldr ls") numbers: Vec, @@ -63,9 +63,10 @@ enum Commands { numbers: Vec, }, /// Scan and review items interactively, from top to bottom - #[command(alias = "review")] + #[command(aliases = ["s", "r", "review"])] Scan, /// Edit items in your $EDITOR + #[command(alias = "e")] Edit, }