Skip to content

Commit

Permalink
chore(doc): doc for custom subcommands
Browse files Browse the repository at this point in the history
  • Loading branch information
linyihai committed Dec 21, 2023
1 parent c2408a7 commit 0b819ba
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/doc/src/reference/external-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,12 @@ cargo `(?<command>[^ ]+)` into an invocation of an external tool
`cargo-${command}`. The external tool must be present in one of the user's
`$PATH` directories.
> Note: Cargo looks for custom subcommands in `$PATH `and then `$CARGO_HOME/bin`,
> and uses the custom subcommands found in `$PATH` first.
> The custom subcommand is typically installed by default in `$CARGO_HOME/bin`
> and executed from there. However, if you prefer to invoke another subcommand elsewhere
> you can add it to the `$PATH` and keep it before `$CARGO_HOME/bin`.
When Cargo invokes a custom subcommand, the first argument to the subcommand
will be the filename of the custom subcommand, as usual. The second argument
will be the subcommand name itself. For example, the second argument would be
Expand Down

0 comments on commit 0b819ba

Please sign in to comment.