chiark / gitweb /
Provide subcmd mode `creates` and specify it for `cargo init`
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 21 Jun 2021 11:47:13 +0000 (12:47 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 21 Jun 2021 12:02:17 +0000 (13:02 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
README.md
nailing-cargo

index 893a698194a69639126b5226a34b374e65bfc1d2..b87350dfadc61806ab919d2b5506e16b17cff23f 100644 (file)
--- a/README.md
+++ b/README.md
@@ -368,6 +368,7 @@ WASM="wasm32-unknown-unknown"
     * `lock_update`: cargo will want to update `Cargo.lock`.  (The `-u` and `-U` options override this.)
     * `online`: this subcommand makes no sense to run offline.  (The `-o` and `-O` options, and the configuration, can override this.)
     * `edits`: The purpose of this subcommand is to edit the source tree.  Produces warning if `--edit-sources` mode not specified.
+    * `creates`: The purpose of this subcommand is to edit the source tree and create new files in it.  Produces warning if `--edit-sources` (`-E`) mode not specified twice.
     * `!target`: cargo would reject `--target=<arch>`; in this case nailing-cargo's `-T` option is ineffective.
     * `!target-dir`: cargo would reject `--target-dir`, so don't pass it.  (Usually we pass `--target-dir=target` when we pass `--manifest-path`, since cargo's default is `target` in the same directory as `Cargo.toml`.)
     * `linkfarm-shallow`: Make the default be `--linkfarm=shallow`.  This is the default for `miri` and can also be used for other subcommands which do not understandg `--manifest-path` properly.
index af32be0406cc38e67bb58f3b4a4bcecd7ea15ce6..220222abcf04c5abbf71c72d544e7f37a6d17525 100755 (executable)
@@ -111,6 +111,7 @@ our %subcmd_props = (
  update            =>[qw( lock-update !target online                     )],
  fetch             =>[qw(                     online   !target-dir       )],
  fmt               =>[qw( !locked     !target !offline !target-dir edits )],
+ init              =>[qw(                                        creates )],
  miri              =>[qw( !locked             !offline  linkfarm-shallow )],
  publish           =>[qw(                     !offline  linkfarm-gitclean )],
  upgrades          =>[qw( !locked                      !target-dir       )],