From 727d5c102840de552822afb82de7475a5183d1f5 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Sat, 11 Apr 2020 04:17:09 -0700 Subject: [PATCH] Fix Z Shell completions The clap-generated zsh completion scripts use unescaped double-quoted strings for the subocommand description text, which causes backtick characters to be evaluated. Remove backticks from the subcommand descriptions, to un-break the zsh completion scripts. type: fixed pr: https://github.com/casey/intermodal/pull/365 --- CHANGELOG.md | 3 ++- book/src/commands/imdl-torrent-create.md | 2 +- book/src/commands/imdl-torrent-link.md | 2 +- book/src/commands/imdl-torrent-show.md | 2 +- book/src/commands/imdl-torrent-stats.md | 2 +- book/src/commands/imdl-torrent-verify.md | 2 +- book/src/commands/imdl-torrent.md | 10 +++++----- completions/imdl.elvish | 10 +++++----- completions/imdl.fish | 10 +++++----- completions/imdl.powershell | 10 +++++----- completions/imdl.zsh | 10 +++++----- man/imdl-torrent-create.1 | 2 +- man/imdl-torrent-link.1 | 2 +- man/imdl-torrent-show.1 | 2 +- man/imdl-torrent-stats.1 | 2 +- man/imdl-torrent-verify.1 | 2 +- man/imdl-torrent.1 | 10 +++++----- src/subcommand/torrent/create.rs | 2 +- src/subcommand/torrent/link.rs | 2 +- src/subcommand/torrent/show.rs | 2 +- src/subcommand/torrent/stats.rs | 2 +- src/subcommand/torrent/verify.rs | 2 +- 22 files changed, 47 insertions(+), 46 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5534d91..b482a5b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,8 @@ Changelog UNRELEASED - 2020-04-11 ----------------------- -- :books: [`xxxxxxxxxxxx`](https://github.com/casey/intermodal/commits/master) Render command help text in book to avoid wrapping ([#364](https://github.com/casey/intermodal/pull/364)) - _Casey Rodarmor _ +- :bug: [`xxxxxxxxxxxx`](https://github.com/casey/intermodal/commits/master) Fix Z Shell completions ([#365](https://github.com/casey/intermodal/pull/365)) - _Casey Rodarmor _ +- :books: [`f05807290b31`](https://github.com/casey/intermodal/commit/f05807290b314cd68e8679a9aba92e5cd3c5403d) Render command help text in book to avoid wrapping ([#364](https://github.com/casey/intermodal/pull/364)) - _Casey Rodarmor _ - :books: [`ed34ff48a740`](https://github.com/casey/intermodal/commit/ed34ff48a7406adb8b4cdb523b5dc1bf9435e1bc) Add `fuchsi/maketorrent` to prior art table ([#362](https://github.com/casey/intermodal/pull/362)) - _Casey Rodarmor _ - :books: [`a3f46187229f`](https://github.com/casey/intermodal/commit/a3f46187229f499e7a13ec5ce656408ba95d1dcc) Rename distributing large datasets ([#361](https://github.com/casey/intermodal/pull/361)) - _Casey Rodarmor _ - :books: [`1c9ff0cde491`](https://github.com/casey/intermodal/commit/1c9ff0cde4910f369e75930257ce92a8cf4c6cd5) Add suggestions for distributing large datasets to book ([#360](https://github.com/casey/intermodal/pull/360)) - _Casey Rodarmor _ diff --git a/book/src/commands/imdl-torrent-create.md b/book/src/commands/imdl-torrent-create.md index c1bf3f03..778fa6d3 100644 --- a/book/src/commands/imdl-torrent-create.md +++ b/book/src/commands/imdl-torrent-create.md @@ -1,7 +1,7 @@ # `imdl torrent create` ``` imdl-torrent-create 0.1.4 -Create a `.torrent` file. +Create a .torrent file. USAGE: imdl torrent create [FLAGS] [OPTIONS] --input diff --git a/book/src/commands/imdl-torrent-link.md b/book/src/commands/imdl-torrent-link.md index 0690ed5c..f8d04e31 100644 --- a/book/src/commands/imdl-torrent-link.md +++ b/book/src/commands/imdl-torrent-link.md @@ -1,7 +1,7 @@ # `imdl torrent link` ``` imdl-torrent-link 0.1.4 -Generate a magnet link from a `.torrent` file. +Generate a magnet link from a .torrent file. USAGE: imdl torrent link [FLAGS] [OPTIONS] --input diff --git a/book/src/commands/imdl-torrent-show.md b/book/src/commands/imdl-torrent-show.md index 0c4257ba..f4b04c52 100644 --- a/book/src/commands/imdl-torrent-show.md +++ b/book/src/commands/imdl-torrent-show.md @@ -1,7 +1,7 @@ # `imdl torrent show` ``` imdl-torrent-show 0.1.4 -Display information about a `.torrent` file. +Display information about a .torrent file. USAGE: imdl torrent show --input diff --git a/book/src/commands/imdl-torrent-stats.md b/book/src/commands/imdl-torrent-stats.md index 0e266350..1a536433 100644 --- a/book/src/commands/imdl-torrent-stats.md +++ b/book/src/commands/imdl-torrent-stats.md @@ -1,7 +1,7 @@ # `imdl torrent stats` ``` imdl-torrent-stats 0.1.4 -Show statistics about a collection of `.torrent` files. +Show statistics about a collection of .torrent files. USAGE: imdl torrent stats [FLAGS] [OPTIONS] --input diff --git a/book/src/commands/imdl-torrent-verify.md b/book/src/commands/imdl-torrent-verify.md index 32036666..4fdc3af0 100644 --- a/book/src/commands/imdl-torrent-verify.md +++ b/book/src/commands/imdl-torrent-verify.md @@ -1,7 +1,7 @@ # `imdl torrent verify` ``` imdl-torrent-verify 0.1.4 -Verify files against a `.torrent` file. +Verify files against a .torrent file. USAGE: imdl torrent verify [OPTIONS] --input diff --git a/book/src/commands/imdl-torrent.md b/book/src/commands/imdl-torrent.md index cfa9d94e..8cd03cbc 100644 --- a/book/src/commands/imdl-torrent.md +++ b/book/src/commands/imdl-torrent.md @@ -11,14 +11,14 @@ FLAGS: -V, --version Print version number. SUBCOMMANDS: - create Create a `.torrent` file. + create Create a .torrent file. help Prints this message or the help of the given subcommand(s) - link Generate a magnet link from a `.torrent` file. + link Generate a magnet link from a .torrent file. piece-length Display information about automatic piece length selection. - show Display information about a `.torrent` file. - stats Show statistics about a collection of `.torrent` files. - verify Verify files against a `.torrent` file. + show Display information about a .torrent file. + stats Show statistics about a collection of .torrent files. + verify Verify files against a .torrent file. ``` \ No newline at end of file diff --git a/completions/imdl.elvish b/completions/imdl.elvish index f04f3c85..3f271708 100644 --- a/completions/imdl.elvish +++ b/completions/imdl.elvish @@ -30,12 +30,12 @@ edit:completion:arg-completer[imdl] = [@words]{ cand --help 'Print help message.' cand -V 'Print version number.' cand --version 'Print version number.' - cand create 'Create a `.torrent` file.' - cand link 'Generate a magnet link from a `.torrent` file.' + cand create 'Create a .torrent file.' + cand link 'Generate a magnet link from a .torrent file.' cand piece-length 'Display information about automatic piece length selection.' - cand show 'Display information about a `.torrent` file.' - cand stats 'Show statistics about a collection of `.torrent` files.' - cand verify 'Verify files against a `.torrent` file.' + cand show 'Display information about a .torrent file.' + cand stats 'Show statistics about a collection of .torrent files.' + cand verify 'Verify files against a .torrent file.' cand help 'Prints this message or the help of the given subcommand(s)' } &'imdl;torrent;create'= { diff --git a/completions/imdl.fish b/completions/imdl.fish index c95ae025..722541c3 100644 --- a/completions/imdl.fish +++ b/completions/imdl.fish @@ -7,12 +7,12 @@ complete -c imdl -n "__fish_use_subcommand" -f -a "completions" -d 'Print shell complete -c imdl -n "__fish_use_subcommand" -f -a "help" -d 'Prints this message or the help of the given subcommand(s)' complete -c imdl -n "__fish_seen_subcommand_from torrent" -s h -l help -d 'Print help message.' complete -c imdl -n "__fish_seen_subcommand_from torrent" -s V -l version -d 'Print version number.' -complete -c imdl -n "__fish_seen_subcommand_from torrent" -f -a "create" -d 'Create a `.torrent` file.' -complete -c imdl -n "__fish_seen_subcommand_from torrent" -f -a "link" -d 'Generate a magnet link from a `.torrent` file.' +complete -c imdl -n "__fish_seen_subcommand_from torrent" -f -a "create" -d 'Create a .torrent file.' +complete -c imdl -n "__fish_seen_subcommand_from torrent" -f -a "link" -d 'Generate a magnet link from a .torrent file.' complete -c imdl -n "__fish_seen_subcommand_from torrent" -f -a "piece-length" -d 'Display information about automatic piece length selection.' -complete -c imdl -n "__fish_seen_subcommand_from torrent" -f -a "show" -d 'Display information about a `.torrent` file.' -complete -c imdl -n "__fish_seen_subcommand_from torrent" -f -a "stats" -d 'Show statistics about a collection of `.torrent` files.' -complete -c imdl -n "__fish_seen_subcommand_from torrent" -f -a "verify" -d 'Verify files against a `.torrent` file.' +complete -c imdl -n "__fish_seen_subcommand_from torrent" -f -a "show" -d 'Display information about a .torrent file.' +complete -c imdl -n "__fish_seen_subcommand_from torrent" -f -a "stats" -d 'Show statistics about a collection of .torrent files.' +complete -c imdl -n "__fish_seen_subcommand_from torrent" -f -a "verify" -d 'Verify files against a .torrent file.' complete -c imdl -n "__fish_seen_subcommand_from torrent" -f -a "help" -d 'Prints this message or the help of the given subcommand(s)' complete -c imdl -n "__fish_seen_subcommand_from create" -s a -l announce -d 'Use `URL` as the primary tracker announce URL. To supply multiple announce URLs, also use `--announce-tier`.' complete -c imdl -n "__fish_seen_subcommand_from create" -s A -l allow -d 'Allow `LINT`. Lints check for conditions which, although permitted, are not usually desirable. For example, piece length can be any non-zero value, but probably shouldn\'t be below 16 KiB. The lint `small-piece-size` checks for this, and `--allow small-piece-size` can be used to disable this check.' -r -f -a "private-trackerless small-piece-length uneven-piece-length" diff --git a/completions/imdl.powershell b/completions/imdl.powershell index bc28259e..2db21f34 100644 --- a/completions/imdl.powershell +++ b/completions/imdl.powershell @@ -36,12 +36,12 @@ Register-ArgumentCompleter -Native -CommandName 'imdl' -ScriptBlock { [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help message.') [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Print version number.') [CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Print version number.') - [CompletionResult]::new('create', 'create', [CompletionResultType]::ParameterValue, 'Create a `.torrent` file.') - [CompletionResult]::new('link', 'link', [CompletionResultType]::ParameterValue, 'Generate a magnet link from a `.torrent` file.') + [CompletionResult]::new('create', 'create', [CompletionResultType]::ParameterValue, 'Create a .torrent file.') + [CompletionResult]::new('link', 'link', [CompletionResultType]::ParameterValue, 'Generate a magnet link from a .torrent file.') [CompletionResult]::new('piece-length', 'piece-length', [CompletionResultType]::ParameterValue, 'Display information about automatic piece length selection.') - [CompletionResult]::new('show', 'show', [CompletionResultType]::ParameterValue, 'Display information about a `.torrent` file.') - [CompletionResult]::new('stats', 'stats', [CompletionResultType]::ParameterValue, 'Show statistics about a collection of `.torrent` files.') - [CompletionResult]::new('verify', 'verify', [CompletionResultType]::ParameterValue, 'Verify files against a `.torrent` file.') + [CompletionResult]::new('show', 'show', [CompletionResultType]::ParameterValue, 'Display information about a .torrent file.') + [CompletionResult]::new('stats', 'stats', [CompletionResultType]::ParameterValue, 'Show statistics about a collection of .torrent files.') + [CompletionResult]::new('verify', 'verify', [CompletionResultType]::ParameterValue, 'Verify files against a .torrent file.') [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Prints this message or the help of the given subcommand(s)') break } diff --git a/completions/imdl.zsh b/completions/imdl.zsh index e034b2d3..4f25b96f 100644 --- a/completions/imdl.zsh +++ b/completions/imdl.zsh @@ -314,12 +314,12 @@ _imdl__torrent__stats_commands() { (( $+functions[_imdl__torrent_commands] )) || _imdl__torrent_commands() { local commands; commands=( - "create:Create a `.torrent` file." \ -"link:Generate a magnet link from a `.torrent` file." \ + "create:Create a .torrent file." \ +"link:Generate a magnet link from a .torrent file." \ "piece-length:Display information about automatic piece length selection." \ -"show:Display information about a `.torrent` file." \ -"stats:Show statistics about a collection of `.torrent` files." \ -"verify:Verify files against a `.torrent` file." \ +"show:Display information about a .torrent file." \ +"stats:Show statistics about a collection of .torrent files." \ +"verify:Verify files against a .torrent file." \ "help:Prints this message or the help of the given subcommand(s)" \ ) _describe -t commands 'imdl torrent commands' commands "$@" diff --git a/man/imdl-torrent-create.1 b/man/imdl-torrent-create.1 index 0cb284fc..6bf10305 100644 --- a/man/imdl-torrent-create.1 +++ b/man/imdl-torrent-create.1 @@ -2,7 +2,7 @@ .TH IMDL-TORRENT-CREATE "1" "April 2020" "Intermodal v0.1.4" "Intermodal Manual" .SH NAME \fBimdl\ torrent\ create\fR -- Create a `.torrent` file. +- Create a .torrent file. .SH "SYNOPSIS:" .IP imdl torrent create [FLAGS] [OPTIONS] \fB\-\-input\fR diff --git a/man/imdl-torrent-link.1 b/man/imdl-torrent-link.1 index 409b1a96..88f7f99f 100644 --- a/man/imdl-torrent-link.1 +++ b/man/imdl-torrent-link.1 @@ -2,7 +2,7 @@ .TH IMDL-TORRENT-LINK "1" "April 2020" "Intermodal v0.1.4" "Intermodal Manual" .SH NAME \fBimdl\ torrent\ link\fR -- Generate a magnet link from a `.torrent` file. +- Generate a magnet link from a .torrent file. .SH "SYNOPSIS:" .IP imdl torrent link [FLAGS] [OPTIONS] \fB\-\-input\fR diff --git a/man/imdl-torrent-show.1 b/man/imdl-torrent-show.1 index 11f73d6b..f7b0176d 100644 --- a/man/imdl-torrent-show.1 +++ b/man/imdl-torrent-show.1 @@ -2,7 +2,7 @@ .TH IMDL-TORRENT-SHOW "1" "April 2020" "Intermodal v0.1.4" "Intermodal Manual" .SH NAME \fBimdl\ torrent\ show\fR -- Display information about a `.torrent` file. +- Display information about a .torrent file. .SH "SYNOPSIS:" .IP imdl torrent show \fB\-\-input\fR diff --git a/man/imdl-torrent-stats.1 b/man/imdl-torrent-stats.1 index 94ed9f27..e1c0c298 100644 --- a/man/imdl-torrent-stats.1 +++ b/man/imdl-torrent-stats.1 @@ -2,7 +2,7 @@ .TH IMDL-TORRENT-STATS "1" "April 2020" "Intermodal v0.1.4" "Intermodal Manual" .SH NAME \fBimdl\ torrent\ stats\fR -- Show statistics about a collection of `.torrent` files. +- Show statistics about a collection of .torrent files. .SH "SYNOPSIS:" .IP imdl torrent stats [FLAGS] [OPTIONS] \fB\-\-input\fR diff --git a/man/imdl-torrent-verify.1 b/man/imdl-torrent-verify.1 index 40d091bd..784d4374 100644 --- a/man/imdl-torrent-verify.1 +++ b/man/imdl-torrent-verify.1 @@ -2,7 +2,7 @@ .TH IMDL-TORRENT-VERIFY "1" "April 2020" "Intermodal v0.1.4" "Intermodal Manual" .SH NAME \fBimdl\ torrent\ verify\fR -- Verify files against a `.torrent` file. +- Verify files against a .torrent file. .SH "SYNOPSIS:" .IP imdl torrent verify [OPTIONS] \fB\-\-input\fR diff --git a/man/imdl-torrent.1 b/man/imdl-torrent.1 index 37b6aa3c..5aafd6d8 100644 --- a/man/imdl-torrent.1 +++ b/man/imdl-torrent.1 @@ -16,22 +16,22 @@ Print version number. .SH "SUBCOMMANDS:" .TP create -Create a `.torrent` file. +Create a .torrent file. .TP help Prints this message or the help of the given subcommand(s) .TP link -Generate a magnet link from a `.torrent` file. +Generate a magnet link from a .torrent file. .TP piece\-length Display information about automatic piece length selection. .TP show -Display information about a `.torrent` file. +Display information about a .torrent file. .TP stats -Show statistics about a collection of `.torrent` files. +Show statistics about a collection of .torrent files. .TP verify -Verify files against a `.torrent` file. +Verify files against a .torrent file. diff --git a/src/subcommand/torrent/create.rs b/src/subcommand/torrent/create.rs index 720cfb3d..317ff484 100644 --- a/src/subcommand/torrent/create.rs +++ b/src/subcommand/torrent/create.rs @@ -9,7 +9,7 @@ mod create_step; #[structopt( help_message(consts::HELP_MESSAGE), version_message(consts::VERSION_MESSAGE), - about("Create a `.torrent` file.") + about("Create a .torrent file.") )] pub(crate) struct Create { #[structopt( diff --git a/src/subcommand/torrent/link.rs b/src/subcommand/torrent/link.rs index 8e891fed..69d1385b 100644 --- a/src/subcommand/torrent/link.rs +++ b/src/subcommand/torrent/link.rs @@ -4,7 +4,7 @@ use crate::common::*; #[structopt( help_message(consts::HELP_MESSAGE), version_message(consts::VERSION_MESSAGE), - about("Generate a magnet link from a `.torrent` file.") + about("Generate a magnet link from a .torrent file.") )] pub(crate) struct Link { #[structopt( diff --git a/src/subcommand/torrent/show.rs b/src/subcommand/torrent/show.rs index be4cc020..7de0b3f7 100644 --- a/src/subcommand/torrent/show.rs +++ b/src/subcommand/torrent/show.rs @@ -4,7 +4,7 @@ use crate::common::*; #[structopt( help_message(consts::HELP_MESSAGE), version_message(consts::VERSION_MESSAGE), - about("Display information about a `.torrent` file.") + about("Display information about a .torrent file.") )] pub(crate) struct Show { #[structopt( diff --git a/src/subcommand/torrent/stats.rs b/src/subcommand/torrent/stats.rs index 8cf19e67..c8a39640 100644 --- a/src/subcommand/torrent/stats.rs +++ b/src/subcommand/torrent/stats.rs @@ -4,7 +4,7 @@ use crate::common::*; #[structopt( help_message(consts::HELP_MESSAGE), version_message(consts::VERSION_MESSAGE), - about("Show statistics about a collection of `.torrent` files.") + about("Show statistics about a collection of .torrent files.") )] pub(crate) struct Stats { #[structopt( diff --git a/src/subcommand/torrent/verify.rs b/src/subcommand/torrent/verify.rs index f0536570..244e401a 100644 --- a/src/subcommand/torrent/verify.rs +++ b/src/subcommand/torrent/verify.rs @@ -7,7 +7,7 @@ mod verify_step; #[structopt( help_message(consts::HELP_MESSAGE), version_message(consts::VERSION_MESSAGE), - about("Verify files against a `.torrent` file.") + about("Verify files against a .torrent file.") )] pub(crate) struct Verify { #[structopt(