diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-08-24 11:29:33 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-08-24 11:45:30 +0200 |
commit | 35db9c0d4ad2029300087370ccaa5c49b10d1638 (patch) | |
tree | 3e59d4e4010b6df601310a31007f1b2f311b1e95 | |
parent | feat(cli/config): Show the currently active configuration (diff) | |
download | yt-35db9c0d4ad2029300087370ccaa5c49b10d1638.tar.gz yt-35db9c0d4ad2029300087370ccaa5c49b10d1638.zip |
fix(cli/selectCommand): Explicitly set the aliases
Otherwise the `w` alias for `watch` would conflict with `watched` and thus not work.
-rw-r--r-- | src/cli.rs | 7 | ||||
-rw-r--r-- | src/select/selection_file/help.str | 9 |
2 files changed, 11 insertions, 5 deletions
diff --git a/src/cli.rs b/src/cli.rs index fe89bf7..895cfc0 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -220,7 +220,6 @@ pub struct SharedSelectionCommandArgs { } #[derive(Subcommand, Clone, Debug)] -#[command(infer_subcommands = true)] // NOTE: Keep this in sync with the [`constants::HELP_STR`] constant. <2024-08-20> pub enum SelectCommand { /// Open a `git rebase` like file to select the videos to watch (the default) @@ -230,30 +229,36 @@ pub enum SelectCommand { done: bool, }, + /// Mark the video given by the hash to be watched + #[command(visible_alias = "w")] Watch { #[command(flatten)] shared: SharedSelectionCommandArgs, }, /// Mark the video given by the hash to be dropped + #[command(visible_alias = "d")] Drop { #[command(flatten)] shared: SharedSelectionCommandArgs, }, /// Mark the video given by the hash as already watched + #[command(visible_alias = "wd")] Watched { #[command(flatten)] shared: SharedSelectionCommandArgs, }, /// Open the video URL in Firefox's `timesinks.youtube` profile + #[command(visible_alias = "u")] Url { #[command(flatten)] shared: SharedSelectionCommandArgs, }, /// Reset the videos status to 'Pick' + #[command(visible_alias = "p")] Pick { #[command(flatten)] shared: SharedSelectionCommandArgs, diff --git a/src/select/selection_file/help.str b/src/select/selection_file/help.str index 9f4a896..f3ad2f2 100644 --- a/src/select/selection_file/help.str +++ b/src/select/selection_file/help.str @@ -1,8 +1,9 @@ # Commands: -# w, watch [-p,-s,-l] Mark the video given by the hash to be watched -# d, drop [-p,-s,-l] Mark the video given by the hash to be dropped -# u, url [-p,-s,-l] Open the video URL in Firefox's `timesinks.youtube` profile -# p, pick [-p,-s,-l] Reset the videos status to 'Pick' +# w, watch [-p,-s,-l] Mark the video given by the hash to be watched +# wd, watched [-p,-s,-l] Mark the video given by the hash as already watched +# d, drop [-p,-s,-l] Mark the video given by the hash to be dropped +# u, url [-p,-s,-l] Open the video URL in Firefox's `timesinks.youtube` profile +# p, pick [-p,-s,-l] Reset the videos status to 'Pick' # # See `yt select <cmd_name> --help` for more help. # |