diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-12-03 14:23:18 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-12-03 16:17:58 +0100 |
commit | 1b0ca3866bae7185e628fda956634c52a5da7a15 (patch) | |
tree | ca4e22821ab184cbb17b9ec4de2d90f821603a86 /src/nix/add-to-store.cc | |
parent | c3c858ac6d0c75bd95bd6913276ef20cf2495e96 (diff) |
nix add-to-store: Move markdown docs into a separate file
Diffstat (limited to 'src/nix/add-to-store.cc')
-rw-r--r-- | src/nix/add-to-store.cc | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/src/nix/add-to-store.cc b/src/nix/add-to-store.cc index 022f0ea85..a2721431e 100644 --- a/src/nix/add-to-store.cc +++ b/src/nix/add-to-store.cc @@ -38,30 +38,9 @@ struct CmdAddToStore : MixDryRun, StoreCommand std::string doc() override { - return R"( - # Description - - Copy the file or directory *path* to the Nix store, and - print the resulting store path on standard output. - - > **Warning** - > - > The resulting store path is not registered as a garbage - > collector root, so it could be deleted before you have a - > chance to register it. - - # Examples - - Add a regular file to the store: - - ```console - # echo foo > bar - # nix add-to-store --flat ./bar - /nix/store/cbv2s4bsvzjri77s2gb8g8bpcb6dpa8w-bar - # cat /nix/store/cbv2s4bsvzjri77s2gb8g8bpcb6dpa8w-bar - foo - ``` - )"; + return + #include "add-to-store.md" + ; } Category category() override { return catUtility; } |