Don't commit shell completion scripts
Committing the completion scripts bloats diffs, so stop committing them. Before copying release files, generate the scripts in `bin/package`. type: development
This commit is contained in:
parent
4f4464e3a2
commit
28114c3d64
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -3,3 +3,4 @@
|
|||
/www/book
|
||||
/book/book
|
||||
/wiki
|
||||
/completions
|
||||
|
|
|
@ -4,7 +4,8 @@ Changelog
|
|||
|
||||
UNRELEASED - 2020-04-21
|
||||
-----------------------
|
||||
- :art: [`xxxxxxxxxxxx`](https://github.com/casey/intermodal/commits/master) Get `st_flags` from `MetadataExt` on MacOS - _Casey Rodarmor <casey@rodarmor.com>_
|
||||
- :wrench: [`xxxxxxxxxxxx`](https://github.com/casey/intermodal/commits/master) Don't commit shell completion scripts - _Casey Rodarmor <casey@rodarmor.com>_
|
||||
- :art: [`4f4464e3a2a7`](https://github.com/casey/intermodal/commit/4f4464e3a2a7f4aaffea8dbe38dd110ad9be4393) Get `st_flags` from `MetadataExt` on MacOS - _Casey Rodarmor <casey@rodarmor.com>_
|
||||
- :sparkles: [`deca555ac3b3`](https://github.com/casey/intermodal/commit/deca555ac3b3b8f665ee6415f80e05b2bb5e4af7) Allow suppressing output with `--quiet` - Fixes [#174](https://github.com/casey/intermodal/issues/174) - _Celeo <celeodor@gmail.com>_
|
||||
- :books: [`838167c4d3bc`](https://github.com/casey/intermodal/commit/838167c4d3bcbe2fa28f27a00bd94b959ad31e15) Describe in FAQ creating torrent from git repo - _Casey Rodarmor <casey@rodarmor.com>_
|
||||
- :sparkles: [`9b72873ed13e`](https://github.com/casey/intermodal/commit/9b72873ed13e8f0ae747714545c48c6e37c67dd0) Optionally respect `.gitignore` in `imdl torrent create` - Fixes [#378](https://github.com/casey/intermodal/issues/378) - _Celeo <celeodor@gmail.com>_
|
||||
|
|
|
@ -96,8 +96,7 @@ source and installed with `cargo install imdl`. To get Rust, use the
|
|||
## Shell Completion Scripts
|
||||
|
||||
Shell completion scripts for Bash, Zsh, Fish, PowerShell, and Elvish are
|
||||
available in the [completions directory](./completions), included in all
|
||||
[binary releases](https://github.com/casey/imdl/releases).
|
||||
included in all [binary releases](https://github.com/casey/imdl/releases).
|
||||
|
||||
For Bash, move `imdl.bash` to `$XDG_CONFIG_HOME/bash_completion` or
|
||||
`/etc/bash_completion.d/`.
|
||||
|
|
|
@ -79,8 +79,7 @@ source and installed with `cargo install imdl`. To get Rust, use the
|
|||
## Shell Completion Scripts
|
||||
|
||||
Shell completion scripts for Bash, Zsh, Fish, PowerShell, and Elvish are
|
||||
available in the [completions directory](./completions), included in all
|
||||
[binary releases](https://github.com/casey/imdl/releases).
|
||||
included in all [binary releases](https://github.com/casey/imdl/releases).
|
||||
|
||||
For Bash, move `imdl.bash` to `$XDG_CONFIG_HOME/bash_completion` or
|
||||
`/etc/bash_completion.d/`.
|
||||
|
|
|
@ -30,6 +30,11 @@ case $os in
|
|||
;;
|
||||
esac
|
||||
|
||||
echo "Building completions..."
|
||||
rm -rf completions
|
||||
mkdir completions
|
||||
$executable completions --dir completions
|
||||
|
||||
echo "Copying release files..."
|
||||
mkdir dist
|
||||
cp -r \
|
||||
|
|
|
@ -1,345 +0,0 @@
|
|||
#compdef imdl
|
||||
|
||||
autoload -U is-at-least
|
||||
|
||||
_imdl() {
|
||||
typeset -A opt_args
|
||||
typeset -a _arguments_options
|
||||
local ret=1
|
||||
|
||||
if is-at-least 5.2; then
|
||||
_arguments_options=(-s -S -C)
|
||||
else
|
||||
_arguments_options=(-s -C)
|
||||
fi
|
||||
|
||||
local context curcontext="$curcontext" state line
|
||||
_arguments "${_arguments_options[@]}" \
|
||||
'-c+[Print colorful output according to `WHEN`. When `auto`, the default, colored output is only enabled if imdl detects that it is connected to a terminal, the `NO_COLOR` environment variable is not set, and the `TERM` environment variable is not set to `dumb`.]: :(auto always never)' \
|
||||
'--color=[Print colorful output according to `WHEN`. When `auto`, the default, colored output is only enabled if imdl detects that it is connected to a terminal, the `NO_COLOR` environment variable is not set, and the `TERM` environment variable is not set to `dumb`.]: :(auto always never)' \
|
||||
'-q[Suppress normal output.]' \
|
||||
'--quiet[Suppress normal output.]' \
|
||||
'-u[Enable unstable features. To avoid premature stabilization and excessive version churn, unstable features are unavailable unless this flag is set. Unstable features are not bound by semantic versioning stability guarantees, and may be changed or removed at any time.]' \
|
||||
'--unstable[Enable unstable features. To avoid premature stabilization and excessive version churn, unstable features are unavailable unless this flag is set. Unstable features are not bound by semantic versioning stability guarantees, and may be changed or removed at any time.]' \
|
||||
'-t[Disable automatic terminal detection and behave as if both standard output and standard error are connected to a terminal.]' \
|
||||
'--terminal[Disable automatic terminal detection and behave as if both standard output and standard error are connected to a terminal.]' \
|
||||
'-h[Print help message.]' \
|
||||
'--help[Print help message.]' \
|
||||
'-V[Print version number.]' \
|
||||
'--version[Print version number.]' \
|
||||
":: :_imdl_commands" \
|
||||
"*::: :->imdl" \
|
||||
&& ret=0
|
||||
case $state in
|
||||
(imdl)
|
||||
words=($line[1] "${words[@]}")
|
||||
(( CURRENT += 1 ))
|
||||
curcontext="${curcontext%:*:*}:imdl-command-$line[1]:"
|
||||
case $line[1] in
|
||||
(torrent)
|
||||
_arguments "${_arguments_options[@]}" \
|
||||
'-h[Print help message.]' \
|
||||
'--help[Print help message.]' \
|
||||
'-V[Print version number.]' \
|
||||
'--version[Print version number.]' \
|
||||
":: :_imdl__torrent_commands" \
|
||||
"*::: :->torrent" \
|
||||
&& ret=0
|
||||
case $state in
|
||||
(torrent)
|
||||
words=($line[1] "${words[@]}")
|
||||
(( CURRENT += 1 ))
|
||||
curcontext="${curcontext%:*:*}:imdl-torrent-command-$line[1]:"
|
||||
case $line[1] in
|
||||
(create)
|
||||
_arguments "${_arguments_options[@]}" \
|
||||
'-a+[Use `URL` as the primary tracker announce URL. To supply multiple announce URLs, also use `--announce-tier`.]' \
|
||||
'--announce=[Use `URL` as the primary tracker announce URL. To supply multiple announce URLs, also use `--announce-tier`.]' \
|
||||
'*-A+[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.]: :(private-trackerless small-piece-length uneven-piece-length)' \
|
||||
'*--allow=[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.]: :(private-trackerless small-piece-length uneven-piece-length)' \
|
||||
'*-t+[Use `URL-LIST` as a tracker announce tier. Each instance adds a new tier. To add multiple trackers to a given tier, separate their announce URLs with commas:
|
||||
|
||||
`--announce-tier udp://example.com:80/announce,https://example.net:443/announce`
|
||||
|
||||
Announce tiers are stored in the `announce-list` key of the top-level metainfo dictionary as a list of lists of strings, as defined by BEP 12: Multitracker Metadata Extension.
|
||||
|
||||
Note: Many BitTorrent clients do not implement the behavior described in BEP 12. See the discussion here for more details: https://github.com/bittorrent/bittorrent.org/issues/82]' \
|
||||
'*--announce-tier=[Use `URL-LIST` as a tracker announce tier. Each instance adds a new tier. To add multiple trackers to a given tier, separate their announce URLs with commas:
|
||||
|
||||
`--announce-tier udp://example.com:80/announce,https://example.net:443/announce`
|
||||
|
||||
Announce tiers are stored in the `announce-list` key of the top-level metainfo dictionary as a list of lists of strings, as defined by BEP 12: Multitracker Metadata Extension.
|
||||
|
||||
Note: Many BitTorrent clients do not implement the behavior described in BEP 12. See the discussion here for more details: https://github.com/bittorrent/bittorrent.org/issues/82]' \
|
||||
'-c+[Include `TEXT` as the comment for generated `.torrent` file. Stored under `comment` key of top-level metainfo dictionary.]' \
|
||||
'--comment=[Include `TEXT` as the comment for generated `.torrent` file. Stored under `comment` key of top-level metainfo dictionary.]' \
|
||||
'*--node=[Add DHT bootstrap node `NODE` to torrent. `NODE` should be in the form `HOST:PORT`, where `HOST` is a domain name, an IPv4 address, or an IPv6 address surrounded by brackets. May be given more than once to add multiple bootstrap nodes.
|
||||
|
||||
Examples:
|
||||
|
||||
--node router.example.com:1337
|
||||
|
||||
--node 203.0.113.0:2290
|
||||
|
||||
--node \[2001:db8:4275:7920:6269:7463:6f69:6e21\]:8832]' \
|
||||
'*-g+[Include or exclude files that match `GLOB`. Multiple glob may be provided, with the last one taking precedence. Precede a glob with `!` to exclude it.]' \
|
||||
'*--glob=[Include or exclude files that match `GLOB`. Multiple glob may be provided, with the last one taking precedence. Precede a glob with `!` to exclude it.]' \
|
||||
'-i+[Read torrent contents from `PATH`. If `PATH` is a file, torrent will be a single-file torrent. If `PATH` is a directory, torrent will be a multi-file torrent. If `PATH` is `-`, read from standard input. Piece length defaults to 256KiB when reading from standard input if `--piece-length` is not given.]' \
|
||||
'--input=[Read torrent contents from `PATH`. If `PATH` is a file, torrent will be a single-file torrent. If `PATH` is a directory, torrent will be a multi-file torrent. If `PATH` is `-`, read from standard input. Piece length defaults to 256KiB when reading from standard input if `--piece-length` is not given.]' \
|
||||
'-N+[Set name of torrent to `TEXT`. Defaults to the filename of the argument to `--input`. Required when `--input -`.]' \
|
||||
'--name=[Set name of torrent to `TEXT`. Defaults to the filename of the argument to `--input`. Required when `--input -`.]' \
|
||||
'*--sort-by=[Set the order of files within a torrent. `SPEC` should be of the form `KEY:ORDER`, with `KEY` being one of `path` or `size`, and `ORDER` being `ascending` or `descending`. `:ORDER` defaults to `ascending` if omitted. The `--sort-by` flag may be given more than once, with later values being used to break ties. Ties that remain are broken in ascending path order.
|
||||
|
||||
Sort in ascending order by path, the default:
|
||||
|
||||
--sort-by path:ascending
|
||||
|
||||
Sort in ascending order by path, more concisely:
|
||||
|
||||
--sort-by path
|
||||
|
||||
Sort in ascending order by size, break ties in descending path order:
|
||||
|
||||
--sort-by size:ascending --sort-by path:descending]' \
|
||||
'-o+[Save `.torrent` file to `TARGET`, or print to standard output if `TARGET` is `-`. Defaults to the argument to `--input` with an `.torrent` extension appended. Required when `--input -`.]' \
|
||||
'--output=[Save `.torrent` file to `TARGET`, or print to standard output if `TARGET` is `-`. Defaults to the argument to `--input` with an `.torrent` extension appended. Required when `--input -`.]' \
|
||||
'*--peer=[Add `PEER` to magnet link.]' \
|
||||
'-p+[Set piece length to `BYTES`. Accepts SI units, e.g. kib, mib, and gib.]' \
|
||||
'--piece-length=[Set piece length to `BYTES`. Accepts SI units, e.g. kib, mib, and gib.]' \
|
||||
'-s+[Set torrent source to `TEXT`. Stored under `source` key of info dictionary. This is useful for keeping statistics from being mis-reported when participating in swarms with the same contents, but with different trackers. When source is set to a unique value for torrents with the same contents, torrent clients will treat them as distinct torrents, and not share peers between them, and will correctly report download and upload statistics to multiple trackers.]' \
|
||||
'--source=[Set torrent source to `TEXT`. Stored under `source` key of info dictionary. This is useful for keeping statistics from being mis-reported when participating in swarms with the same contents, but with different trackers. When source is set to a unique value for torrents with the same contents, torrent clients will treat them as distinct torrents, and not share peers between them, and will correctly report download and upload statistics to multiple trackers.]' \
|
||||
'-n[Skip writing `.torrent` file to disk.]' \
|
||||
'--dry-run[Skip writing `.torrent` file to disk.]' \
|
||||
'-F[Follow symlinks in torrent input. By default, symlinks to files and directories are not included in torrent contents.]' \
|
||||
'--follow-symlinks[Follow symlinks in torrent input. By default, symlinks to files and directories are not included in torrent contents.]' \
|
||||
'-f[Overwrite the destination `.torrent` file, if it exists.]' \
|
||||
'--force[Overwrite the destination `.torrent` file, if it exists.]' \
|
||||
'-h[Include hidden files that would otherwise be skipped, such as files that start with a `.`, and files hidden by file attributes on macOS and Windows.]' \
|
||||
'--include-hidden[Include hidden files that would otherwise be skipped, such as files that start with a `.`, and files hidden by file attributes on macOS and Windows.]' \
|
||||
'-j[Include junk files that would otherwise be skipped.]' \
|
||||
'--include-junk[Include junk files that would otherwise be skipped.]' \
|
||||
'--link[Print created torrent `magnet:` URL to standard output]' \
|
||||
'-M[Include MD5 checksum of each file in the torrent. N.B. MD5 is cryptographically broken and only suitable for checking for accidental corruption.]' \
|
||||
'--md5[Include MD5 checksum of each file in the torrent. N.B. MD5 is cryptographically broken and only suitable for checking for accidental corruption.]' \
|
||||
'--no-created-by[Do not populate `created by` key of generated torrent with imdl version information.]' \
|
||||
'--no-creation-date[Do not populate `creation date` key of generated torrent with current time.]' \
|
||||
'-O[Open `.torrent` file after creation. Uses `xdg-open`, `gnome-open`, or `kde-open` on Linux; `open` on macOS; and `cmd /C start` on Windows]' \
|
||||
'--open[Open `.torrent` file after creation. Uses `xdg-open`, `gnome-open`, or `kde-open` on Linux; `open` on macOS; and `cmd /C start` on Windows]' \
|
||||
'-P[Set the `private` flag. Torrent clients that understand the flag and participate in the swarm of a torrent with the flag set will only announce themselves to the announce URLs included in the torrent, and will not use other peer discovery mechanisms, such as the DHT or local peer discovery. See BEP 27: Private Torrents for more information.]' \
|
||||
'--private[Set the `private` flag. Torrent clients that understand the flag and participate in the swarm of a torrent with the flag set will only announce themselves to the announce URLs included in the torrent, and will not use other peer discovery mechanisms, such as the DHT or local peer discovery. See BEP 27: Private Torrents for more information.]' \
|
||||
'-S[Display information about created torrent file.]' \
|
||||
'--show[Display information about created torrent file.]' \
|
||||
'--ignore[Skip files listed in `.gitignore`, `.ignore`, `.git/info/exclude`, and `git config --get core.excludesFile`.]' \
|
||||
'--help[Print help message.]' \
|
||||
'-V[Print version number.]' \
|
||||
'--version[Print version number.]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(link)
|
||||
_arguments "${_arguments_options[@]}" \
|
||||
'-i+[Generate magnet link from metainfo at `PATH`. If `PATH` is `-`, read metainfo from standard input.]' \
|
||||
'--input=[Generate magnet link from metainfo at `PATH`. If `PATH` is `-`, read metainfo from standard input.]' \
|
||||
'*-p+[Add `PEER` to magnet link.]' \
|
||||
'*--peer=[Add `PEER` to magnet link.]' \
|
||||
'*-s+[Select files to download. Values are indices into the `info.files` list, e.g. `--select-only 1,2,3`.]' \
|
||||
'*--select-only=[Select files to download. Values are indices into the `info.files` list, e.g. `--select-only 1,2,3`.]' \
|
||||
'-O[Open generated magnet link. Uses `xdg-open`, `gnome-open`, or `kde-open` on Linux; `open` on macOS; and `cmd /C start` on Windows.]' \
|
||||
'--open[Open generated magnet link. Uses `xdg-open`, `gnome-open`, or `kde-open` on Linux; `open` on macOS; and `cmd /C start` on Windows.]' \
|
||||
'-h[Print help message.]' \
|
||||
'--help[Print help message.]' \
|
||||
'-V[Print version number.]' \
|
||||
'--version[Print version number.]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(piece-size)
|
||||
_arguments "${_arguments_options[@]}" \
|
||||
'-h[Print help message.]' \
|
||||
'--help[Print help message.]' \
|
||||
'-V[Print version number.]' \
|
||||
'--version[Print version number.]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(piece-length)
|
||||
_arguments "${_arguments_options[@]}" \
|
||||
'-h[Print help message.]' \
|
||||
'--help[Print help message.]' \
|
||||
'-V[Print version number.]' \
|
||||
'--version[Print version number.]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(show)
|
||||
_arguments "${_arguments_options[@]}" \
|
||||
'-i+[Show information about torrent at `PATH`. If `Path` is `-`, read torrent metainfo from standard input.]' \
|
||||
'--input=[Show information about torrent at `PATH`. If `Path` is `-`, read torrent metainfo from standard input.]' \
|
||||
'-h[Print help message.]' \
|
||||
'--help[Print help message.]' \
|
||||
'-V[Print version number.]' \
|
||||
'--version[Print version number.]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(stats)
|
||||
_arguments "${_arguments_options[@]}" \
|
||||
'-l+[Stop after processing `N` torrents. Useful when processing large collections of `.torrent` files.]' \
|
||||
'--limit=[Stop after processing `N` torrents. Useful when processing large collections of `.torrent` files.]' \
|
||||
'*-e+[Extract and display values under key paths that match `REGEX`. Subkeys of a bencodeded dictionary are delimited by `/`, and values of a bencoded list are delmited by `*`. For example, given the following bencoded dictionary `{"foo": \[{"bar": {"baz": 2}}\]}`, the value `2`'\''s key path will be `foo*bar/baz`. The value `2` would be displayed if any of `bar`, `foo\[*\]bar/baz`, or `foo.*baz` were passed to `--extract-pattern.]' \
|
||||
'*--extract-pattern=[Extract and display values under key paths that match `REGEX`. Subkeys of a bencodeded dictionary are delimited by `/`, and values of a bencoded list are delmited by `*`. For example, given the following bencoded dictionary `{"foo": \[{"bar": {"baz": 2}}\]}`, the value `2`'\''s key path will be `foo*bar/baz`. The value `2` would be displayed if any of `bar`, `foo\[*\]bar/baz`, or `foo.*baz` were passed to `--extract-pattern.]' \
|
||||
'-i+[Search `PATH` for torrents. May be a directory or a single torrent file.]' \
|
||||
'--input=[Search `PATH` for torrents. May be a directory or a single torrent file.]' \
|
||||
'-p[Pretty print the contents of each torrent as it is processed.]' \
|
||||
'--print[Pretty print the contents of each torrent as it is processed.]' \
|
||||
'-h[Print help message.]' \
|
||||
'--help[Print help message.]' \
|
||||
'-V[Print version number.]' \
|
||||
'--version[Print version number.]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(verify)
|
||||
_arguments "${_arguments_options[@]}" \
|
||||
'-i+[Verify torrent contents against torrent metainfo in `METAINFO`. If `METAINFO` is `-`, read metainfo from standard input.]' \
|
||||
'--input=[Verify torrent contents against torrent metainfo in `METAINFO`. If `METAINFO` is `-`, read metainfo from standard input.]' \
|
||||
'-c+[Verify torrent content at `PATH` against torrent metainfo. Defaults to `name` field of torrent info dictionary.]' \
|
||||
'--content=[Verify torrent content at `PATH` against torrent metainfo. Defaults to `name` field of torrent info dictionary.]' \
|
||||
'-h[Print help message.]' \
|
||||
'--help[Print help message.]' \
|
||||
'-V[Print version number.]' \
|
||||
'--version[Print version number.]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(help)
|
||||
_arguments "${_arguments_options[@]}" \
|
||||
'-h[Prints help information]' \
|
||||
'--help[Prints help information]' \
|
||||
'-V[Prints version information]' \
|
||||
'--version[Prints version information]' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
(completions)
|
||||
_arguments "${_arguments_options[@]}" \
|
||||
'-s+[Print completion script for `SHELL`.]: :(zsh bash fish powershell elvish)' \
|
||||
'--shell=[Print completion script for `SHELL`.]: :(zsh bash fish powershell elvish)' \
|
||||
'-d+[Write completion script to `DIR` with an appropriate filename. If `--shell` is not given, write all completion scripts.]' \
|
||||
'--dir=[Write completion script to `DIR` with an appropriate filename. If `--shell` is not given, write all completion scripts.]' \
|
||||
'-h[Print help message.]' \
|
||||
'--help[Print help message.]' \
|
||||
'-V[Print version number.]' \
|
||||
'--version[Print version number.]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(help)
|
||||
_arguments "${_arguments_options[@]}" \
|
||||
'-h[Prints help information]' \
|
||||
'--help[Prints help information]' \
|
||||
'-V[Prints version information]' \
|
||||
'--version[Prints version information]' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
(( $+functions[_imdl_commands] )) ||
|
||||
_imdl_commands() {
|
||||
local commands; commands=(
|
||||
"torrent:Subcommands related to the BitTorrent protocol." \
|
||||
"completions:Print shell completion scripts to standard output." \
|
||||
"help:Prints this message or the help of the given subcommand(s)" \
|
||||
)
|
||||
_describe -t commands 'imdl commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_imdl__completions_commands] )) ||
|
||||
_imdl__completions_commands() {
|
||||
local commands; commands=(
|
||||
|
||||
)
|
||||
_describe -t commands 'imdl completions commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_imdl__torrent__create_commands] )) ||
|
||||
_imdl__torrent__create_commands() {
|
||||
local commands; commands=(
|
||||
|
||||
)
|
||||
_describe -t commands 'imdl torrent create commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_imdl__help_commands] )) ||
|
||||
_imdl__help_commands() {
|
||||
local commands; commands=(
|
||||
|
||||
)
|
||||
_describe -t commands 'imdl help commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_imdl__torrent__help_commands] )) ||
|
||||
_imdl__torrent__help_commands() {
|
||||
local commands; commands=(
|
||||
|
||||
)
|
||||
_describe -t commands 'imdl torrent help commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_imdl__torrent__link_commands] )) ||
|
||||
_imdl__torrent__link_commands() {
|
||||
local commands; commands=(
|
||||
|
||||
)
|
||||
_describe -t commands 'imdl torrent link commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_imdl__torrent__piece-length_commands] )) ||
|
||||
_imdl__torrent__piece-length_commands() {
|
||||
local commands; commands=(
|
||||
|
||||
)
|
||||
_describe -t commands 'imdl torrent piece-length commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_imdl__piece-size_commands] )) ||
|
||||
_imdl__piece-size_commands() {
|
||||
local commands; commands=(
|
||||
|
||||
)
|
||||
_describe -t commands 'imdl piece-size commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_imdl__torrent__piece-size_commands] )) ||
|
||||
_imdl__torrent__piece-size_commands() {
|
||||
local commands; commands=(
|
||||
|
||||
)
|
||||
_describe -t commands 'imdl torrent piece-size commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_imdl__torrent__show_commands] )) ||
|
||||
_imdl__torrent__show_commands() {
|
||||
local commands; commands=(
|
||||
|
||||
)
|
||||
_describe -t commands 'imdl torrent show commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_imdl__torrent__stats_commands] )) ||
|
||||
_imdl__torrent__stats_commands() {
|
||||
local commands; commands=(
|
||||
|
||||
)
|
||||
_describe -t commands 'imdl torrent stats commands' 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." \
|
||||
"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." \
|
||||
"help:Prints this message or the help of the given subcommand(s)" \
|
||||
)
|
||||
_describe -t commands 'imdl torrent commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_imdl__torrent__verify_commands] )) ||
|
||||
_imdl__torrent__verify_commands() {
|
||||
local commands; commands=(
|
||||
|
||||
)
|
||||
_describe -t commands 'imdl torrent verify commands' commands "$@"
|
||||
}
|
||||
|
||||
_imdl "$@"
|
|
@ -1,222 +0,0 @@
|
|||
using namespace System.Management.Automation
|
||||
using namespace System.Management.Automation.Language
|
||||
|
||||
Register-ArgumentCompleter -Native -CommandName 'imdl' -ScriptBlock {
|
||||
param($wordToComplete, $commandAst, $cursorPosition)
|
||||
|
||||
$commandElements = $commandAst.CommandElements
|
||||
$command = @(
|
||||
'imdl'
|
||||
for ($i = 1; $i -lt $commandElements.Count; $i++) {
|
||||
$element = $commandElements[$i]
|
||||
if ($element -isnot [StringConstantExpressionAst] -or
|
||||
$element.StringConstantType -ne [StringConstantType]::BareWord -or
|
||||
$element.Value.StartsWith('-')) {
|
||||
break
|
||||
}
|
||||
$element.Value
|
||||
}) -join ';'
|
||||
|
||||
$completions = @(switch ($command) {
|
||||
'imdl' {
|
||||
[CompletionResult]::new('-c', 'c', [CompletionResultType]::ParameterName, 'Print colorful output according to `WHEN`. When `auto`, the default, colored output is only enabled if imdl detects that it is connected to a terminal, the `NO_COLOR` environment variable is not set, and the `TERM` environment variable is not set to `dumb`.')
|
||||
[CompletionResult]::new('--color', 'color', [CompletionResultType]::ParameterName, 'Print colorful output according to `WHEN`. When `auto`, the default, colored output is only enabled if imdl detects that it is connected to a terminal, the `NO_COLOR` environment variable is not set, and the `TERM` environment variable is not set to `dumb`.')
|
||||
[CompletionResult]::new('-q', 'q', [CompletionResultType]::ParameterName, 'Suppress normal output.')
|
||||
[CompletionResult]::new('--quiet', 'quiet', [CompletionResultType]::ParameterName, 'Suppress normal output.')
|
||||
[CompletionResult]::new('-u', 'u', [CompletionResultType]::ParameterName, 'Enable unstable features. To avoid premature stabilization and excessive version churn, unstable features are unavailable unless this flag is set. Unstable features are not bound by semantic versioning stability guarantees, and may be changed or removed at any time.')
|
||||
[CompletionResult]::new('--unstable', 'unstable', [CompletionResultType]::ParameterName, 'Enable unstable features. To avoid premature stabilization and excessive version churn, unstable features are unavailable unless this flag is set. Unstable features are not bound by semantic versioning stability guarantees, and may be changed or removed at any time.')
|
||||
[CompletionResult]::new('-t', 't', [CompletionResultType]::ParameterName, 'Disable automatic terminal detection and behave as if both standard output and standard error are connected to a terminal.')
|
||||
[CompletionResult]::new('--terminal', 'terminal', [CompletionResultType]::ParameterName, 'Disable automatic terminal detection and behave as if both standard output and standard error are connected to a terminal.')
|
||||
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help message.')
|
||||
[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('torrent', 'torrent', [CompletionResultType]::ParameterValue, 'Subcommands related to the BitTorrent protocol.')
|
||||
[CompletionResult]::new('completions', 'completions', [CompletionResultType]::ParameterValue, 'Print shell completion scripts to standard output.')
|
||||
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Prints this message or the help of the given subcommand(s)')
|
||||
break
|
||||
}
|
||||
'imdl;torrent' {
|
||||
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help message.')
|
||||
[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('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('help', 'help', [CompletionResultType]::ParameterValue, 'Prints this message or the help of the given subcommand(s)')
|
||||
break
|
||||
}
|
||||
'imdl;torrent;create' {
|
||||
[CompletionResult]::new('-a', 'a', [CompletionResultType]::ParameterName, 'Use `URL` as the primary tracker announce URL. To supply multiple announce URLs, also use `--announce-tier`.')
|
||||
[CompletionResult]::new('--announce', 'announce', [CompletionResultType]::ParameterName, 'Use `URL` as the primary tracker announce URL. To supply multiple announce URLs, also use `--announce-tier`.')
|
||||
[CompletionResult]::new('-A', 'A', [CompletionResultType]::ParameterName, '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.')
|
||||
[CompletionResult]::new('--allow', 'allow', [CompletionResultType]::ParameterName, '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.')
|
||||
[CompletionResult]::new('-t', 't', [CompletionResultType]::ParameterName, 'Use `URL-LIST` as a tracker announce tier. Each instance adds a new tier. To add multiple trackers to a given tier, separate their announce URLs with commas:
|
||||
|
||||
`--announce-tier udp://example.com:80/announce,https://example.net:443/announce`
|
||||
|
||||
Announce tiers are stored in the `announce-list` key of the top-level metainfo dictionary as a list of lists of strings, as defined by BEP 12: Multitracker Metadata Extension.
|
||||
|
||||
Note: Many BitTorrent clients do not implement the behavior described in BEP 12. See the discussion here for more details: https://github.com/bittorrent/bittorrent.org/issues/82')
|
||||
[CompletionResult]::new('--announce-tier', 'announce-tier', [CompletionResultType]::ParameterName, 'Use `URL-LIST` as a tracker announce tier. Each instance adds a new tier. To add multiple trackers to a given tier, separate their announce URLs with commas:
|
||||
|
||||
`--announce-tier udp://example.com:80/announce,https://example.net:443/announce`
|
||||
|
||||
Announce tiers are stored in the `announce-list` key of the top-level metainfo dictionary as a list of lists of strings, as defined by BEP 12: Multitracker Metadata Extension.
|
||||
|
||||
Note: Many BitTorrent clients do not implement the behavior described in BEP 12. See the discussion here for more details: https://github.com/bittorrent/bittorrent.org/issues/82')
|
||||
[CompletionResult]::new('-c', 'c', [CompletionResultType]::ParameterName, 'Include `TEXT` as the comment for generated `.torrent` file. Stored under `comment` key of top-level metainfo dictionary.')
|
||||
[CompletionResult]::new('--comment', 'comment', [CompletionResultType]::ParameterName, 'Include `TEXT` as the comment for generated `.torrent` file. Stored under `comment` key of top-level metainfo dictionary.')
|
||||
[CompletionResult]::new('--node', 'node', [CompletionResultType]::ParameterName, 'Add DHT bootstrap node `NODE` to torrent. `NODE` should be in the form `HOST:PORT`, where `HOST` is a domain name, an IPv4 address, or an IPv6 address surrounded by brackets. May be given more than once to add multiple bootstrap nodes.
|
||||
|
||||
Examples:
|
||||
|
||||
--node router.example.com:1337
|
||||
|
||||
--node 203.0.113.0:2290
|
||||
|
||||
--node [2001:db8:4275:7920:6269:7463:6f69:6e21]:8832')
|
||||
[CompletionResult]::new('-g', 'g', [CompletionResultType]::ParameterName, 'Include or exclude files that match `GLOB`. Multiple glob may be provided, with the last one taking precedence. Precede a glob with `!` to exclude it.')
|
||||
[CompletionResult]::new('--glob', 'glob', [CompletionResultType]::ParameterName, 'Include or exclude files that match `GLOB`. Multiple glob may be provided, with the last one taking precedence. Precede a glob with `!` to exclude it.')
|
||||
[CompletionResult]::new('-i', 'i', [CompletionResultType]::ParameterName, 'Read torrent contents from `PATH`. If `PATH` is a file, torrent will be a single-file torrent. If `PATH` is a directory, torrent will be a multi-file torrent. If `PATH` is `-`, read from standard input. Piece length defaults to 256KiB when reading from standard input if `--piece-length` is not given.')
|
||||
[CompletionResult]::new('--input', 'input', [CompletionResultType]::ParameterName, 'Read torrent contents from `PATH`. If `PATH` is a file, torrent will be a single-file torrent. If `PATH` is a directory, torrent will be a multi-file torrent. If `PATH` is `-`, read from standard input. Piece length defaults to 256KiB when reading from standard input if `--piece-length` is not given.')
|
||||
[CompletionResult]::new('-N', 'N', [CompletionResultType]::ParameterName, 'Set name of torrent to `TEXT`. Defaults to the filename of the argument to `--input`. Required when `--input -`.')
|
||||
[CompletionResult]::new('--name', 'name', [CompletionResultType]::ParameterName, 'Set name of torrent to `TEXT`. Defaults to the filename of the argument to `--input`. Required when `--input -`.')
|
||||
[CompletionResult]::new('--sort-by', 'sort-by', [CompletionResultType]::ParameterName, 'Set the order of files within a torrent. `SPEC` should be of the form `KEY:ORDER`, with `KEY` being one of `path` or `size`, and `ORDER` being `ascending` or `descending`. `:ORDER` defaults to `ascending` if omitted. The `--sort-by` flag may be given more than once, with later values being used to break ties. Ties that remain are broken in ascending path order.
|
||||
|
||||
Sort in ascending order by path, the default:
|
||||
|
||||
--sort-by path:ascending
|
||||
|
||||
Sort in ascending order by path, more concisely:
|
||||
|
||||
--sort-by path
|
||||
|
||||
Sort in ascending order by size, break ties in descending path order:
|
||||
|
||||
--sort-by size:ascending --sort-by path:descending')
|
||||
[CompletionResult]::new('-o', 'o', [CompletionResultType]::ParameterName, 'Save `.torrent` file to `TARGET`, or print to standard output if `TARGET` is `-`. Defaults to the argument to `--input` with an `.torrent` extension appended. Required when `--input -`.')
|
||||
[CompletionResult]::new('--output', 'output', [CompletionResultType]::ParameterName, 'Save `.torrent` file to `TARGET`, or print to standard output if `TARGET` is `-`. Defaults to the argument to `--input` with an `.torrent` extension appended. Required when `--input -`.')
|
||||
[CompletionResult]::new('--peer', 'peer', [CompletionResultType]::ParameterName, 'Add `PEER` to magnet link.')
|
||||
[CompletionResult]::new('-p', 'p', [CompletionResultType]::ParameterName, 'Set piece length to `BYTES`. Accepts SI units, e.g. kib, mib, and gib.')
|
||||
[CompletionResult]::new('--piece-length', 'piece-length', [CompletionResultType]::ParameterName, 'Set piece length to `BYTES`. Accepts SI units, e.g. kib, mib, and gib.')
|
||||
[CompletionResult]::new('-s', 's', [CompletionResultType]::ParameterName, 'Set torrent source to `TEXT`. Stored under `source` key of info dictionary. This is useful for keeping statistics from being mis-reported when participating in swarms with the same contents, but with different trackers. When source is set to a unique value for torrents with the same contents, torrent clients will treat them as distinct torrents, and not share peers between them, and will correctly report download and upload statistics to multiple trackers.')
|
||||
[CompletionResult]::new('--source', 'source', [CompletionResultType]::ParameterName, 'Set torrent source to `TEXT`. Stored under `source` key of info dictionary. This is useful for keeping statistics from being mis-reported when participating in swarms with the same contents, but with different trackers. When source is set to a unique value for torrents with the same contents, torrent clients will treat them as distinct torrents, and not share peers between them, and will correctly report download and upload statistics to multiple trackers.')
|
||||
[CompletionResult]::new('-n', 'n', [CompletionResultType]::ParameterName, 'Skip writing `.torrent` file to disk.')
|
||||
[CompletionResult]::new('--dry-run', 'dry-run', [CompletionResultType]::ParameterName, 'Skip writing `.torrent` file to disk.')
|
||||
[CompletionResult]::new('-F', 'F', [CompletionResultType]::ParameterName, 'Follow symlinks in torrent input. By default, symlinks to files and directories are not included in torrent contents.')
|
||||
[CompletionResult]::new('--follow-symlinks', 'follow-symlinks', [CompletionResultType]::ParameterName, 'Follow symlinks in torrent input. By default, symlinks to files and directories are not included in torrent contents.')
|
||||
[CompletionResult]::new('-f', 'f', [CompletionResultType]::ParameterName, 'Overwrite the destination `.torrent` file, if it exists.')
|
||||
[CompletionResult]::new('--force', 'force', [CompletionResultType]::ParameterName, 'Overwrite the destination `.torrent` file, if it exists.')
|
||||
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Include hidden files that would otherwise be skipped, such as files that start with a `.`, and files hidden by file attributes on macOS and Windows.')
|
||||
[CompletionResult]::new('--include-hidden', 'include-hidden', [CompletionResultType]::ParameterName, 'Include hidden files that would otherwise be skipped, such as files that start with a `.`, and files hidden by file attributes on macOS and Windows.')
|
||||
[CompletionResult]::new('-j', 'j', [CompletionResultType]::ParameterName, 'Include junk files that would otherwise be skipped.')
|
||||
[CompletionResult]::new('--include-junk', 'include-junk', [CompletionResultType]::ParameterName, 'Include junk files that would otherwise be skipped.')
|
||||
[CompletionResult]::new('--link', 'link', [CompletionResultType]::ParameterName, 'Print created torrent `magnet:` URL to standard output')
|
||||
[CompletionResult]::new('-M', 'M', [CompletionResultType]::ParameterName, 'Include MD5 checksum of each file in the torrent. N.B. MD5 is cryptographically broken and only suitable for checking for accidental corruption.')
|
||||
[CompletionResult]::new('--md5', 'md5', [CompletionResultType]::ParameterName, 'Include MD5 checksum of each file in the torrent. N.B. MD5 is cryptographically broken and only suitable for checking for accidental corruption.')
|
||||
[CompletionResult]::new('--no-created-by', 'no-created-by', [CompletionResultType]::ParameterName, 'Do not populate `created by` key of generated torrent with imdl version information.')
|
||||
[CompletionResult]::new('--no-creation-date', 'no-creation-date', [CompletionResultType]::ParameterName, 'Do not populate `creation date` key of generated torrent with current time.')
|
||||
[CompletionResult]::new('-O', 'O', [CompletionResultType]::ParameterName, 'Open `.torrent` file after creation. Uses `xdg-open`, `gnome-open`, or `kde-open` on Linux; `open` on macOS; and `cmd /C start` on Windows')
|
||||
[CompletionResult]::new('--open', 'open', [CompletionResultType]::ParameterName, 'Open `.torrent` file after creation. Uses `xdg-open`, `gnome-open`, or `kde-open` on Linux; `open` on macOS; and `cmd /C start` on Windows')
|
||||
[CompletionResult]::new('-P', 'P', [CompletionResultType]::ParameterName, 'Set the `private` flag. Torrent clients that understand the flag and participate in the swarm of a torrent with the flag set will only announce themselves to the announce URLs included in the torrent, and will not use other peer discovery mechanisms, such as the DHT or local peer discovery. See BEP 27: Private Torrents for more information.')
|
||||
[CompletionResult]::new('--private', 'private', [CompletionResultType]::ParameterName, 'Set the `private` flag. Torrent clients that understand the flag and participate in the swarm of a torrent with the flag set will only announce themselves to the announce URLs included in the torrent, and will not use other peer discovery mechanisms, such as the DHT or local peer discovery. See BEP 27: Private Torrents for more information.')
|
||||
[CompletionResult]::new('-S', 'S', [CompletionResultType]::ParameterName, 'Display information about created torrent file.')
|
||||
[CompletionResult]::new('--show', 'show', [CompletionResultType]::ParameterName, 'Display information about created torrent file.')
|
||||
[CompletionResult]::new('--ignore', 'ignore', [CompletionResultType]::ParameterName, 'Skip files listed in `.gitignore`, `.ignore`, `.git/info/exclude`, and `git config --get core.excludesFile`.')
|
||||
[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.')
|
||||
break
|
||||
}
|
||||
'imdl;torrent;link' {
|
||||
[CompletionResult]::new('-i', 'i', [CompletionResultType]::ParameterName, 'Generate magnet link from metainfo at `PATH`. If `PATH` is `-`, read metainfo from standard input.')
|
||||
[CompletionResult]::new('--input', 'input', [CompletionResultType]::ParameterName, 'Generate magnet link from metainfo at `PATH`. If `PATH` is `-`, read metainfo from standard input.')
|
||||
[CompletionResult]::new('-p', 'p', [CompletionResultType]::ParameterName, 'Add `PEER` to magnet link.')
|
||||
[CompletionResult]::new('--peer', 'peer', [CompletionResultType]::ParameterName, 'Add `PEER` to magnet link.')
|
||||
[CompletionResult]::new('-s', 's', [CompletionResultType]::ParameterName, 'Select files to download. Values are indices into the `info.files` list, e.g. `--select-only 1,2,3`.')
|
||||
[CompletionResult]::new('--select-only', 'select-only', [CompletionResultType]::ParameterName, 'Select files to download. Values are indices into the `info.files` list, e.g. `--select-only 1,2,3`.')
|
||||
[CompletionResult]::new('-O', 'O', [CompletionResultType]::ParameterName, 'Open generated magnet link. Uses `xdg-open`, `gnome-open`, or `kde-open` on Linux; `open` on macOS; and `cmd /C start` on Windows.')
|
||||
[CompletionResult]::new('--open', 'open', [CompletionResultType]::ParameterName, 'Open generated magnet link. Uses `xdg-open`, `gnome-open`, or `kde-open` on Linux; `open` on macOS; and `cmd /C start` on Windows.')
|
||||
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help message.')
|
||||
[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.')
|
||||
break
|
||||
}
|
||||
'imdl;torrent;piece-length' {
|
||||
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help message.')
|
||||
[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.')
|
||||
break
|
||||
}
|
||||
'imdl;torrent;show' {
|
||||
[CompletionResult]::new('-i', 'i', [CompletionResultType]::ParameterName, 'Show information about torrent at `PATH`. If `Path` is `-`, read torrent metainfo from standard input.')
|
||||
[CompletionResult]::new('--input', 'input', [CompletionResultType]::ParameterName, 'Show information about torrent at `PATH`. If `Path` is `-`, read torrent metainfo from standard input.')
|
||||
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help message.')
|
||||
[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.')
|
||||
break
|
||||
}
|
||||
'imdl;torrent;stats' {
|
||||
[CompletionResult]::new('-l', 'l', [CompletionResultType]::ParameterName, 'Stop after processing `N` torrents. Useful when processing large collections of `.torrent` files.')
|
||||
[CompletionResult]::new('--limit', 'limit', [CompletionResultType]::ParameterName, 'Stop after processing `N` torrents. Useful when processing large collections of `.torrent` files.')
|
||||
[CompletionResult]::new('-e', 'e', [CompletionResultType]::ParameterName, 'Extract and display values under key paths that match `REGEX`. Subkeys of a bencodeded dictionary are delimited by `/`, and values of a bencoded list are delmited by `*`. For example, given the following bencoded dictionary `{"foo": [{"bar": {"baz": 2}}]}`, the value `2`''s key path will be `foo*bar/baz`. The value `2` would be displayed if any of `bar`, `foo[*]bar/baz`, or `foo.*baz` were passed to `--extract-pattern.')
|
||||
[CompletionResult]::new('--extract-pattern', 'extract-pattern', [CompletionResultType]::ParameterName, 'Extract and display values under key paths that match `REGEX`. Subkeys of a bencodeded dictionary are delimited by `/`, and values of a bencoded list are delmited by `*`. For example, given the following bencoded dictionary `{"foo": [{"bar": {"baz": 2}}]}`, the value `2`''s key path will be `foo*bar/baz`. The value `2` would be displayed if any of `bar`, `foo[*]bar/baz`, or `foo.*baz` were passed to `--extract-pattern.')
|
||||
[CompletionResult]::new('-i', 'i', [CompletionResultType]::ParameterName, 'Search `PATH` for torrents. May be a directory or a single torrent file.')
|
||||
[CompletionResult]::new('--input', 'input', [CompletionResultType]::ParameterName, 'Search `PATH` for torrents. May be a directory or a single torrent file.')
|
||||
[CompletionResult]::new('-p', 'p', [CompletionResultType]::ParameterName, 'Pretty print the contents of each torrent as it is processed.')
|
||||
[CompletionResult]::new('--print', 'print', [CompletionResultType]::ParameterName, 'Pretty print the contents of each torrent as it is processed.')
|
||||
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help message.')
|
||||
[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.')
|
||||
break
|
||||
}
|
||||
'imdl;torrent;verify' {
|
||||
[CompletionResult]::new('-i', 'i', [CompletionResultType]::ParameterName, 'Verify torrent contents against torrent metainfo in `METAINFO`. If `METAINFO` is `-`, read metainfo from standard input.')
|
||||
[CompletionResult]::new('--input', 'input', [CompletionResultType]::ParameterName, 'Verify torrent contents against torrent metainfo in `METAINFO`. If `METAINFO` is `-`, read metainfo from standard input.')
|
||||
[CompletionResult]::new('-c', 'c', [CompletionResultType]::ParameterName, 'Verify torrent content at `PATH` against torrent metainfo. Defaults to `name` field of torrent info dictionary.')
|
||||
[CompletionResult]::new('--content', 'content', [CompletionResultType]::ParameterName, 'Verify torrent content at `PATH` against torrent metainfo. Defaults to `name` field of torrent info dictionary.')
|
||||
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help message.')
|
||||
[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.')
|
||||
break
|
||||
}
|
||||
'imdl;torrent;help' {
|
||||
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
|
||||
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
|
||||
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
|
||||
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
|
||||
break
|
||||
}
|
||||
'imdl;completions' {
|
||||
[CompletionResult]::new('-s', 's', [CompletionResultType]::ParameterName, 'Print completion script for `SHELL`.')
|
||||
[CompletionResult]::new('--shell', 'shell', [CompletionResultType]::ParameterName, 'Print completion script for `SHELL`.')
|
||||
[CompletionResult]::new('-d', 'd', [CompletionResultType]::ParameterName, 'Write completion script to `DIR` with an appropriate filename. If `--shell` is not given, write all completion scripts.')
|
||||
[CompletionResult]::new('--dir', 'dir', [CompletionResultType]::ParameterName, 'Write completion script to `DIR` with an appropriate filename. If `--shell` is not given, write all completion scripts.')
|
||||
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help message.')
|
||||
[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.')
|
||||
break
|
||||
}
|
||||
'imdl;help' {
|
||||
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
|
||||
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
|
||||
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
|
||||
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
|
||||
break
|
||||
}
|
||||
})
|
||||
|
||||
$completions.Where{ $_.CompletionText -like "$wordToComplete*" } |
|
||||
Sort-Object -Property ListItemText
|
||||
}
|
|
@ -1,424 +0,0 @@
|
|||
_imdl() {
|
||||
local i cur prev opts cmds
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
cmd=""
|
||||
opts=""
|
||||
|
||||
for i in ${COMP_WORDS[@]}
|
||||
do
|
||||
case "${i}" in
|
||||
imdl)
|
||||
cmd="imdl"
|
||||
;;
|
||||
|
||||
completions)
|
||||
cmd+="__completions"
|
||||
;;
|
||||
create)
|
||||
cmd+="__create"
|
||||
;;
|
||||
help)
|
||||
cmd+="__help"
|
||||
;;
|
||||
link)
|
||||
cmd+="__link"
|
||||
;;
|
||||
piece-length)
|
||||
cmd+="__piece__length"
|
||||
;;
|
||||
piece-size)
|
||||
cmd+="__piece__size"
|
||||
;;
|
||||
show)
|
||||
cmd+="__show"
|
||||
;;
|
||||
stats)
|
||||
cmd+="__stats"
|
||||
;;
|
||||
torrent)
|
||||
cmd+="__torrent"
|
||||
;;
|
||||
verify)
|
||||
cmd+="__verify"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
case "${cmd}" in
|
||||
imdl)
|
||||
opts=" -q -u -t -h -V -c --quiet --unstable --terminal --help --version --color torrent completions help"
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
fi
|
||||
case "${prev}" in
|
||||
|
||||
--color)
|
||||
COMPREPLY=($(compgen -W "auto always never" -- "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-c)
|
||||
COMPREPLY=($(compgen -W "auto always never" -- "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
COMPREPLY=()
|
||||
;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
|
||||
imdl__completions)
|
||||
opts=" -h -V -s -d --help --version --shell --dir "
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
fi
|
||||
case "${prev}" in
|
||||
|
||||
--shell)
|
||||
COMPREPLY=($(compgen -W "zsh bash fish powershell elvish" -- "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-s)
|
||||
COMPREPLY=($(compgen -W "zsh bash fish powershell elvish" -- "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--dir)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-d)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
COMPREPLY=()
|
||||
;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
imdl__help)
|
||||
opts=" -h -V --help --version "
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
fi
|
||||
case "${prev}" in
|
||||
|
||||
*)
|
||||
COMPREPLY=()
|
||||
;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
imdl__torrent)
|
||||
opts=" -h -V --help --version create link piece-length show stats verify help piece-size"
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
fi
|
||||
case "${prev}" in
|
||||
|
||||
*)
|
||||
COMPREPLY=()
|
||||
;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
imdl__torrent__create)
|
||||
opts=" -n -F -f -h -j -M -O -P -S -V -a -A -t -c -g -i -N -o -p -s --dry-run --follow-symlinks --force --include-hidden --include-junk --link --md5 --no-created-by --no-creation-date --open --private --show --ignore --help --version --announce --allow --announce-tier --comment --node --glob --input --name --sort-by --output --peer --piece-length --source "
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
fi
|
||||
case "${prev}" in
|
||||
|
||||
--announce)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-a)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--allow)
|
||||
COMPREPLY=($(compgen -W "private-trackerless small-piece-length uneven-piece-length" -- "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-A)
|
||||
COMPREPLY=($(compgen -W "private-trackerless small-piece-length uneven-piece-length" -- "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--announce-tier)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-t)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--comment)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-c)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--node)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--glob)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-g)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--input)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-i)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--name)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-N)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--sort-by)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--output)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-o)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--peer)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--piece-length)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-p)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--source)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-s)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
COMPREPLY=()
|
||||
;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
imdl__torrent__help)
|
||||
opts=" -h -V --help --version "
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
fi
|
||||
case "${prev}" in
|
||||
|
||||
*)
|
||||
COMPREPLY=()
|
||||
;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
imdl__torrent__link)
|
||||
opts=" -O -h -V -i -p -s --open --help --version --input --peer --select-only "
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
fi
|
||||
case "${prev}" in
|
||||
|
||||
--input)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-i)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--peer)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-p)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--select-only)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-s)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
COMPREPLY=()
|
||||
;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
imdl__torrent__piece__length)
|
||||
opts=" -h -V --help --version "
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
fi
|
||||
case "${prev}" in
|
||||
|
||||
*)
|
||||
COMPREPLY=()
|
||||
;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
imdl__torrent__piece__size)
|
||||
opts=" -h -V --help --version "
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
fi
|
||||
case "${prev}" in
|
||||
|
||||
*)
|
||||
COMPREPLY=()
|
||||
;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
imdl__torrent__show)
|
||||
opts=" -h -V -i --help --version --input "
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
fi
|
||||
case "${prev}" in
|
||||
|
||||
--input)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-i)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
COMPREPLY=()
|
||||
;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
imdl__torrent__stats)
|
||||
opts=" -p -h -V -l -e -i --print --help --version --limit --extract-pattern --input "
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
fi
|
||||
case "${prev}" in
|
||||
|
||||
--limit)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-l)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--extract-pattern)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-e)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--input)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-i)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
COMPREPLY=()
|
||||
;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
imdl__torrent__verify)
|
||||
opts=" -h -V -i -c --help --version --input --content "
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
fi
|
||||
case "${prev}" in
|
||||
|
||||
--input)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-i)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--content)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-c)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
COMPREPLY=()
|
||||
;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
complete -F _imdl -o bashdefault -o default imdl
|
|
@ -1,204 +0,0 @@
|
|||
edit:completion:arg-completer[imdl] = [@words]{
|
||||
fn spaces [n]{
|
||||
repeat $n ' ' | joins ''
|
||||
}
|
||||
fn cand [text desc]{
|
||||
edit:complex-candidate $text &display-suffix=' '(spaces (- 14 (wcswidth $text)))$desc
|
||||
}
|
||||
command = 'imdl'
|
||||
for word $words[1:-1] {
|
||||
if (has-prefix $word '-') {
|
||||
break
|
||||
}
|
||||
command = $command';'$word
|
||||
}
|
||||
completions = [
|
||||
&'imdl'= {
|
||||
cand -c 'Print colorful output according to `WHEN`. When `auto`, the default, colored output is only enabled if imdl detects that it is connected to a terminal, the `NO_COLOR` environment variable is not set, and the `TERM` environment variable is not set to `dumb`.'
|
||||
cand --color 'Print colorful output according to `WHEN`. When `auto`, the default, colored output is only enabled if imdl detects that it is connected to a terminal, the `NO_COLOR` environment variable is not set, and the `TERM` environment variable is not set to `dumb`.'
|
||||
cand -q 'Suppress normal output.'
|
||||
cand --quiet 'Suppress normal output.'
|
||||
cand -u 'Enable unstable features. To avoid premature stabilization and excessive version churn, unstable features are unavailable unless this flag is set. Unstable features are not bound by semantic versioning stability guarantees, and may be changed or removed at any time.'
|
||||
cand --unstable 'Enable unstable features. To avoid premature stabilization and excessive version churn, unstable features are unavailable unless this flag is set. Unstable features are not bound by semantic versioning stability guarantees, and may be changed or removed at any time.'
|
||||
cand -t 'Disable automatic terminal detection and behave as if both standard output and standard error are connected to a terminal.'
|
||||
cand --terminal 'Disable automatic terminal detection and behave as if both standard output and standard error are connected to a terminal.'
|
||||
cand -h 'Print help message.'
|
||||
cand --help 'Print help message.'
|
||||
cand -V 'Print version number.'
|
||||
cand --version 'Print version number.'
|
||||
cand torrent 'Subcommands related to the BitTorrent protocol.'
|
||||
cand completions 'Print shell completion scripts to standard output.'
|
||||
cand help 'Prints this message or the help of the given subcommand(s)'
|
||||
}
|
||||
&'imdl;torrent'= {
|
||||
cand -h 'Print help message.'
|
||||
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 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 help 'Prints this message or the help of the given subcommand(s)'
|
||||
}
|
||||
&'imdl;torrent;create'= {
|
||||
cand -a 'Use `URL` as the primary tracker announce URL. To supply multiple announce URLs, also use `--announce-tier`.'
|
||||
cand --announce 'Use `URL` as the primary tracker announce URL. To supply multiple announce URLs, also use `--announce-tier`.'
|
||||
cand -A '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.'
|
||||
cand --allow '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.'
|
||||
cand -t 'Use `URL-LIST` as a tracker announce tier. Each instance adds a new tier. To add multiple trackers to a given tier, separate their announce URLs with commas:
|
||||
|
||||
`--announce-tier udp://example.com:80/announce,https://example.net:443/announce`
|
||||
|
||||
Announce tiers are stored in the `announce-list` key of the top-level metainfo dictionary as a list of lists of strings, as defined by BEP 12: Multitracker Metadata Extension.
|
||||
|
||||
Note: Many BitTorrent clients do not implement the behavior described in BEP 12. See the discussion here for more details: https://github.com/bittorrent/bittorrent.org/issues/82'
|
||||
cand --announce-tier 'Use `URL-LIST` as a tracker announce tier. Each instance adds a new tier. To add multiple trackers to a given tier, separate their announce URLs with commas:
|
||||
|
||||
`--announce-tier udp://example.com:80/announce,https://example.net:443/announce`
|
||||
|
||||
Announce tiers are stored in the `announce-list` key of the top-level metainfo dictionary as a list of lists of strings, as defined by BEP 12: Multitracker Metadata Extension.
|
||||
|
||||
Note: Many BitTorrent clients do not implement the behavior described in BEP 12. See the discussion here for more details: https://github.com/bittorrent/bittorrent.org/issues/82'
|
||||
cand -c 'Include `TEXT` as the comment for generated `.torrent` file. Stored under `comment` key of top-level metainfo dictionary.'
|
||||
cand --comment 'Include `TEXT` as the comment for generated `.torrent` file. Stored under `comment` key of top-level metainfo dictionary.'
|
||||
cand --node 'Add DHT bootstrap node `NODE` to torrent. `NODE` should be in the form `HOST:PORT`, where `HOST` is a domain name, an IPv4 address, or an IPv6 address surrounded by brackets. May be given more than once to add multiple bootstrap nodes.
|
||||
|
||||
Examples:
|
||||
|
||||
--node router.example.com:1337
|
||||
|
||||
--node 203.0.113.0:2290
|
||||
|
||||
--node [2001:db8:4275:7920:6269:7463:6f69:6e21]:8832'
|
||||
cand -g 'Include or exclude files that match `GLOB`. Multiple glob may be provided, with the last one taking precedence. Precede a glob with `!` to exclude it.'
|
||||
cand --glob 'Include or exclude files that match `GLOB`. Multiple glob may be provided, with the last one taking precedence. Precede a glob with `!` to exclude it.'
|
||||
cand -i 'Read torrent contents from `PATH`. If `PATH` is a file, torrent will be a single-file torrent. If `PATH` is a directory, torrent will be a multi-file torrent. If `PATH` is `-`, read from standard input. Piece length defaults to 256KiB when reading from standard input if `--piece-length` is not given.'
|
||||
cand --input 'Read torrent contents from `PATH`. If `PATH` is a file, torrent will be a single-file torrent. If `PATH` is a directory, torrent will be a multi-file torrent. If `PATH` is `-`, read from standard input. Piece length defaults to 256KiB when reading from standard input if `--piece-length` is not given.'
|
||||
cand -N 'Set name of torrent to `TEXT`. Defaults to the filename of the argument to `--input`. Required when `--input -`.'
|
||||
cand --name 'Set name of torrent to `TEXT`. Defaults to the filename of the argument to `--input`. Required when `--input -`.'
|
||||
cand --sort-by 'Set the order of files within a torrent. `SPEC` should be of the form `KEY:ORDER`, with `KEY` being one of `path` or `size`, and `ORDER` being `ascending` or `descending`. `:ORDER` defaults to `ascending` if omitted. The `--sort-by` flag may be given more than once, with later values being used to break ties. Ties that remain are broken in ascending path order.
|
||||
|
||||
Sort in ascending order by path, the default:
|
||||
|
||||
--sort-by path:ascending
|
||||
|
||||
Sort in ascending order by path, more concisely:
|
||||
|
||||
--sort-by path
|
||||
|
||||
Sort in ascending order by size, break ties in descending path order:
|
||||
|
||||
--sort-by size:ascending --sort-by path:descending'
|
||||
cand -o 'Save `.torrent` file to `TARGET`, or print to standard output if `TARGET` is `-`. Defaults to the argument to `--input` with an `.torrent` extension appended. Required when `--input -`.'
|
||||
cand --output 'Save `.torrent` file to `TARGET`, or print to standard output if `TARGET` is `-`. Defaults to the argument to `--input` with an `.torrent` extension appended. Required when `--input -`.'
|
||||
cand --peer 'Add `PEER` to magnet link.'
|
||||
cand -p 'Set piece length to `BYTES`. Accepts SI units, e.g. kib, mib, and gib.'
|
||||
cand --piece-length 'Set piece length to `BYTES`. Accepts SI units, e.g. kib, mib, and gib.'
|
||||
cand -s 'Set torrent source to `TEXT`. Stored under `source` key of info dictionary. This is useful for keeping statistics from being mis-reported when participating in swarms with the same contents, but with different trackers. When source is set to a unique value for torrents with the same contents, torrent clients will treat them as distinct torrents, and not share peers between them, and will correctly report download and upload statistics to multiple trackers.'
|
||||
cand --source 'Set torrent source to `TEXT`. Stored under `source` key of info dictionary. This is useful for keeping statistics from being mis-reported when participating in swarms with the same contents, but with different trackers. When source is set to a unique value for torrents with the same contents, torrent clients will treat them as distinct torrents, and not share peers between them, and will correctly report download and upload statistics to multiple trackers.'
|
||||
cand -n 'Skip writing `.torrent` file to disk.'
|
||||
cand --dry-run 'Skip writing `.torrent` file to disk.'
|
||||
cand -F 'Follow symlinks in torrent input. By default, symlinks to files and directories are not included in torrent contents.'
|
||||
cand --follow-symlinks 'Follow symlinks in torrent input. By default, symlinks to files and directories are not included in torrent contents.'
|
||||
cand -f 'Overwrite the destination `.torrent` file, if it exists.'
|
||||
cand --force 'Overwrite the destination `.torrent` file, if it exists.'
|
||||
cand -h 'Include hidden files that would otherwise be skipped, such as files that start with a `.`, and files hidden by file attributes on macOS and Windows.'
|
||||
cand --include-hidden 'Include hidden files that would otherwise be skipped, such as files that start with a `.`, and files hidden by file attributes on macOS and Windows.'
|
||||
cand -j 'Include junk files that would otherwise be skipped.'
|
||||
cand --include-junk 'Include junk files that would otherwise be skipped.'
|
||||
cand --link 'Print created torrent `magnet:` URL to standard output'
|
||||
cand -M 'Include MD5 checksum of each file in the torrent. N.B. MD5 is cryptographically broken and only suitable for checking for accidental corruption.'
|
||||
cand --md5 'Include MD5 checksum of each file in the torrent. N.B. MD5 is cryptographically broken and only suitable for checking for accidental corruption.'
|
||||
cand --no-created-by 'Do not populate `created by` key of generated torrent with imdl version information.'
|
||||
cand --no-creation-date 'Do not populate `creation date` key of generated torrent with current time.'
|
||||
cand -O 'Open `.torrent` file after creation. Uses `xdg-open`, `gnome-open`, or `kde-open` on Linux; `open` on macOS; and `cmd /C start` on Windows'
|
||||
cand --open 'Open `.torrent` file after creation. Uses `xdg-open`, `gnome-open`, or `kde-open` on Linux; `open` on macOS; and `cmd /C start` on Windows'
|
||||
cand -P 'Set the `private` flag. Torrent clients that understand the flag and participate in the swarm of a torrent with the flag set will only announce themselves to the announce URLs included in the torrent, and will not use other peer discovery mechanisms, such as the DHT or local peer discovery. See BEP 27: Private Torrents for more information.'
|
||||
cand --private 'Set the `private` flag. Torrent clients that understand the flag and participate in the swarm of a torrent with the flag set will only announce themselves to the announce URLs included in the torrent, and will not use other peer discovery mechanisms, such as the DHT or local peer discovery. See BEP 27: Private Torrents for more information.'
|
||||
cand -S 'Display information about created torrent file.'
|
||||
cand --show 'Display information about created torrent file.'
|
||||
cand --ignore 'Skip files listed in `.gitignore`, `.ignore`, `.git/info/exclude`, and `git config --get core.excludesFile`.'
|
||||
cand --help 'Print help message.'
|
||||
cand -V 'Print version number.'
|
||||
cand --version 'Print version number.'
|
||||
}
|
||||
&'imdl;torrent;link'= {
|
||||
cand -i 'Generate magnet link from metainfo at `PATH`. If `PATH` is `-`, read metainfo from standard input.'
|
||||
cand --input 'Generate magnet link from metainfo at `PATH`. If `PATH` is `-`, read metainfo from standard input.'
|
||||
cand -p 'Add `PEER` to magnet link.'
|
||||
cand --peer 'Add `PEER` to magnet link.'
|
||||
cand -s 'Select files to download. Values are indices into the `info.files` list, e.g. `--select-only 1,2,3`.'
|
||||
cand --select-only 'Select files to download. Values are indices into the `info.files` list, e.g. `--select-only 1,2,3`.'
|
||||
cand -O 'Open generated magnet link. Uses `xdg-open`, `gnome-open`, or `kde-open` on Linux; `open` on macOS; and `cmd /C start` on Windows.'
|
||||
cand --open 'Open generated magnet link. Uses `xdg-open`, `gnome-open`, or `kde-open` on Linux; `open` on macOS; and `cmd /C start` on Windows.'
|
||||
cand -h 'Print help message.'
|
||||
cand --help 'Print help message.'
|
||||
cand -V 'Print version number.'
|
||||
cand --version 'Print version number.'
|
||||
}
|
||||
&'imdl;torrent;piece-length'= {
|
||||
cand -h 'Print help message.'
|
||||
cand --help 'Print help message.'
|
||||
cand -V 'Print version number.'
|
||||
cand --version 'Print version number.'
|
||||
}
|
||||
&'imdl;torrent;show'= {
|
||||
cand -i 'Show information about torrent at `PATH`. If `Path` is `-`, read torrent metainfo from standard input.'
|
||||
cand --input 'Show information about torrent at `PATH`. If `Path` is `-`, read torrent metainfo from standard input.'
|
||||
cand -h 'Print help message.'
|
||||
cand --help 'Print help message.'
|
||||
cand -V 'Print version number.'
|
||||
cand --version 'Print version number.'
|
||||
}
|
||||
&'imdl;torrent;stats'= {
|
||||
cand -l 'Stop after processing `N` torrents. Useful when processing large collections of `.torrent` files.'
|
||||
cand --limit 'Stop after processing `N` torrents. Useful when processing large collections of `.torrent` files.'
|
||||
cand -e 'Extract and display values under key paths that match `REGEX`. Subkeys of a bencodeded dictionary are delimited by `/`, and values of a bencoded list are delmited by `*`. For example, given the following bencoded dictionary `{"foo": [{"bar": {"baz": 2}}]}`, the value `2`''s key path will be `foo*bar/baz`. The value `2` would be displayed if any of `bar`, `foo[*]bar/baz`, or `foo.*baz` were passed to `--extract-pattern.'
|
||||
cand --extract-pattern 'Extract and display values under key paths that match `REGEX`. Subkeys of a bencodeded dictionary are delimited by `/`, and values of a bencoded list are delmited by `*`. For example, given the following bencoded dictionary `{"foo": [{"bar": {"baz": 2}}]}`, the value `2`''s key path will be `foo*bar/baz`. The value `2` would be displayed if any of `bar`, `foo[*]bar/baz`, or `foo.*baz` were passed to `--extract-pattern.'
|
||||
cand -i 'Search `PATH` for torrents. May be a directory or a single torrent file.'
|
||||
cand --input 'Search `PATH` for torrents. May be a directory or a single torrent file.'
|
||||
cand -p 'Pretty print the contents of each torrent as it is processed.'
|
||||
cand --print 'Pretty print the contents of each torrent as it is processed.'
|
||||
cand -h 'Print help message.'
|
||||
cand --help 'Print help message.'
|
||||
cand -V 'Print version number.'
|
||||
cand --version 'Print version number.'
|
||||
}
|
||||
&'imdl;torrent;verify'= {
|
||||
cand -i 'Verify torrent contents against torrent metainfo in `METAINFO`. If `METAINFO` is `-`, read metainfo from standard input.'
|
||||
cand --input 'Verify torrent contents against torrent metainfo in `METAINFO`. If `METAINFO` is `-`, read metainfo from standard input.'
|
||||
cand -c 'Verify torrent content at `PATH` against torrent metainfo. Defaults to `name` field of torrent info dictionary.'
|
||||
cand --content 'Verify torrent content at `PATH` against torrent metainfo. Defaults to `name` field of torrent info dictionary.'
|
||||
cand -h 'Print help message.'
|
||||
cand --help 'Print help message.'
|
||||
cand -V 'Print version number.'
|
||||
cand --version 'Print version number.'
|
||||
}
|
||||
&'imdl;torrent;help'= {
|
||||
cand -h 'Prints help information'
|
||||
cand --help 'Prints help information'
|
||||
cand -V 'Prints version information'
|
||||
cand --version 'Prints version information'
|
||||
}
|
||||
&'imdl;completions'= {
|
||||
cand -s 'Print completion script for `SHELL`.'
|
||||
cand --shell 'Print completion script for `SHELL`.'
|
||||
cand -d 'Write completion script to `DIR` with an appropriate filename. If `--shell` is not given, write all completion scripts.'
|
||||
cand --dir 'Write completion script to `DIR` with an appropriate filename. If `--shell` is not given, write all completion scripts.'
|
||||
cand -h 'Print help message.'
|
||||
cand --help 'Print help message.'
|
||||
cand -V 'Print version number.'
|
||||
cand --version 'Print version number.'
|
||||
}
|
||||
&'imdl;help'= {
|
||||
cand -h 'Prints help information'
|
||||
cand --help 'Prints help information'
|
||||
cand -V 'Prints version information'
|
||||
cand --version 'Prints version information'
|
||||
}
|
||||
]
|
||||
$completions[$command]
|
||||
}
|
|
@ -1,101 +0,0 @@
|
|||
complete -c imdl -n "__fish_use_subcommand" -s c -l color -d 'Print colorful output according to `WHEN`. When `auto`, the default, colored output is only enabled if imdl detects that it is connected to a terminal, the `NO_COLOR` environment variable is not set, and the `TERM` environment variable is not set to `dumb`.' -r -f -a "auto always never"
|
||||
complete -c imdl -n "__fish_use_subcommand" -s q -l quiet -d 'Suppress normal output.'
|
||||
complete -c imdl -n "__fish_use_subcommand" -s u -l unstable -d 'Enable unstable features. To avoid premature stabilization and excessive version churn, unstable features are unavailable unless this flag is set. Unstable features are not bound by semantic versioning stability guarantees, and may be changed or removed at any time.'
|
||||
complete -c imdl -n "__fish_use_subcommand" -s t -l terminal -d 'Disable automatic terminal detection and behave as if both standard output and standard error are connected to a terminal.'
|
||||
complete -c imdl -n "__fish_use_subcommand" -s h -l help -d 'Print help message.'
|
||||
complete -c imdl -n "__fish_use_subcommand" -s V -l version -d 'Print version number.'
|
||||
complete -c imdl -n "__fish_use_subcommand" -f -a "torrent" -d 'Subcommands related to the BitTorrent protocol.'
|
||||
complete -c imdl -n "__fish_use_subcommand" -f -a "completions" -d 'Print shell completion scripts to standard output.'
|
||||
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 "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 "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"
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -s t -l announce-tier -d 'Use `URL-LIST` as a tracker announce tier. Each instance adds a new tier. To add multiple trackers to a given tier, separate their announce URLs with commas:
|
||||
|
||||
`--announce-tier udp://example.com:80/announce,https://example.net:443/announce`
|
||||
|
||||
Announce tiers are stored in the `announce-list` key of the top-level metainfo dictionary as a list of lists of strings, as defined by BEP 12: Multitracker Metadata Extension.
|
||||
|
||||
Note: Many BitTorrent clients do not implement the behavior described in BEP 12. See the discussion here for more details: https://github.com/bittorrent/bittorrent.org/issues/82'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -s c -l comment -d 'Include `TEXT` as the comment for generated `.torrent` file. Stored under `comment` key of top-level metainfo dictionary.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -l node -d 'Add DHT bootstrap node `NODE` to torrent. `NODE` should be in the form `HOST:PORT`, where `HOST` is a domain name, an IPv4 address, or an IPv6 address surrounded by brackets. May be given more than once to add multiple bootstrap nodes.
|
||||
|
||||
Examples:
|
||||
|
||||
--node router.example.com:1337
|
||||
|
||||
--node 203.0.113.0:2290
|
||||
|
||||
--node [2001:db8:4275:7920:6269:7463:6f69:6e21]:8832'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -s g -l glob -d 'Include or exclude files that match `GLOB`. Multiple glob may be provided, with the last one taking precedence. Precede a glob with `!` to exclude it.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -s i -l input -d 'Read torrent contents from `PATH`. If `PATH` is a file, torrent will be a single-file torrent. If `PATH` is a directory, torrent will be a multi-file torrent. If `PATH` is `-`, read from standard input. Piece length defaults to 256KiB when reading from standard input if `--piece-length` is not given.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -s N -l name -d 'Set name of torrent to `TEXT`. Defaults to the filename of the argument to `--input`. Required when `--input -`.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -l sort-by -d 'Set the order of files within a torrent. `SPEC` should be of the form `KEY:ORDER`, with `KEY` being one of `path` or `size`, and `ORDER` being `ascending` or `descending`. `:ORDER` defaults to `ascending` if omitted. The `--sort-by` flag may be given more than once, with later values being used to break ties. Ties that remain are broken in ascending path order.
|
||||
|
||||
Sort in ascending order by path, the default:
|
||||
|
||||
--sort-by path:ascending
|
||||
|
||||
Sort in ascending order by path, more concisely:
|
||||
|
||||
--sort-by path
|
||||
|
||||
Sort in ascending order by size, break ties in descending path order:
|
||||
|
||||
--sort-by size:ascending --sort-by path:descending'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -s o -l output -d 'Save `.torrent` file to `TARGET`, or print to standard output if `TARGET` is `-`. Defaults to the argument to `--input` with an `.torrent` extension appended. Required when `--input -`.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -l peer -d 'Add `PEER` to magnet link.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -s p -l piece-length -d 'Set piece length to `BYTES`. Accepts SI units, e.g. kib, mib, and gib.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -s s -l source -d 'Set torrent source to `TEXT`. Stored under `source` key of info dictionary. This is useful for keeping statistics from being mis-reported when participating in swarms with the same contents, but with different trackers. When source is set to a unique value for torrents with the same contents, torrent clients will treat them as distinct torrents, and not share peers between them, and will correctly report download and upload statistics to multiple trackers.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -s n -l dry-run -d 'Skip writing `.torrent` file to disk.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -s F -l follow-symlinks -d 'Follow symlinks in torrent input. By default, symlinks to files and directories are not included in torrent contents.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -s f -l force -d 'Overwrite the destination `.torrent` file, if it exists.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -s h -l include-hidden -d 'Include hidden files that would otherwise be skipped, such as files that start with a `.`, and files hidden by file attributes on macOS and Windows.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -s j -l include-junk -d 'Include junk files that would otherwise be skipped.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -l link -d 'Print created torrent `magnet:` URL to standard output'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -s M -l md5 -d 'Include MD5 checksum of each file in the torrent. N.B. MD5 is cryptographically broken and only suitable for checking for accidental corruption.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -l no-created-by -d 'Do not populate `created by` key of generated torrent with imdl version information.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -l no-creation-date -d 'Do not populate `creation date` key of generated torrent with current time.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -s O -l open -d 'Open `.torrent` file after creation. Uses `xdg-open`, `gnome-open`, or `kde-open` on Linux; `open` on macOS; and `cmd /C start` on Windows'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -s P -l private -d 'Set the `private` flag. Torrent clients that understand the flag and participate in the swarm of a torrent with the flag set will only announce themselves to the announce URLs included in the torrent, and will not use other peer discovery mechanisms, such as the DHT or local peer discovery. See BEP 27: Private Torrents for more information.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -s S -l show -d 'Display information about created torrent file.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -l ignore -d 'Skip files listed in `.gitignore`, `.ignore`, `.git/info/exclude`, and `git config --get core.excludesFile`.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -l help -d 'Print help message.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from create" -s V -l version -d 'Print version number.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from link" -s i -l input -d 'Generate magnet link from metainfo at `PATH`. If `PATH` is `-`, read metainfo from standard input.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from link" -s p -l peer -d 'Add `PEER` to magnet link.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from link" -s s -l select-only -d 'Select files to download. Values are indices into the `info.files` list, e.g. `--select-only 1,2,3`.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from link" -s O -l open -d 'Open generated magnet link. Uses `xdg-open`, `gnome-open`, or `kde-open` on Linux; `open` on macOS; and `cmd /C start` on Windows.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from link" -s h -l help -d 'Print help message.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from link" -s V -l version -d 'Print version number.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from piece-length" -s h -l help -d 'Print help message.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from piece-length" -s V -l version -d 'Print version number.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from show" -s i -l input -d 'Show information about torrent at `PATH`. If `Path` is `-`, read torrent metainfo from standard input.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from show" -s h -l help -d 'Print help message.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from show" -s V -l version -d 'Print version number.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from stats" -s l -l limit -d 'Stop after processing `N` torrents. Useful when processing large collections of `.torrent` files.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from stats" -s e -l extract-pattern -d 'Extract and display values under key paths that match `REGEX`. Subkeys of a bencodeded dictionary are delimited by `/`, and values of a bencoded list are delmited by `*`. For example, given the following bencoded dictionary `{"foo": [{"bar": {"baz": 2}}]}`, the value `2`\'s key path will be `foo*bar/baz`. The value `2` would be displayed if any of `bar`, `foo[*]bar/baz`, or `foo.*baz` were passed to `--extract-pattern.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from stats" -s i -l input -d 'Search `PATH` for torrents. May be a directory or a single torrent file.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from stats" -s p -l print -d 'Pretty print the contents of each torrent as it is processed.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from stats" -s h -l help -d 'Print help message.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from stats" -s V -l version -d 'Print version number.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from verify" -s i -l input -d 'Verify torrent contents against torrent metainfo in `METAINFO`. If `METAINFO` is `-`, read metainfo from standard input.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from verify" -s c -l content -d 'Verify torrent content at `PATH` against torrent metainfo. Defaults to `name` field of torrent info dictionary.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from verify" -s h -l help -d 'Print help message.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from verify" -s V -l version -d 'Print version number.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from help" -s h -l help -d 'Prints help information'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from help" -s V -l version -d 'Prints version information'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from completions" -s s -l shell -d 'Print completion script for `SHELL`.' -r -f -a "zsh bash fish powershell elvish"
|
||||
complete -c imdl -n "__fish_seen_subcommand_from completions" -s d -l dir -d 'Write completion script to `DIR` with an appropriate filename. If `--shell` is not given, write all completion scripts.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from completions" -s h -l help -d 'Print help message.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from completions" -s V -l version -d 'Print version number.'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from help" -s h -l help -d 'Prints help information'
|
||||
complete -c imdl -n "__fish_seen_subcommand_from help" -s V -l version -d 'Prints version information'
|
Loading…
Reference in New Issue
Block a user