Add an alias for a clap argument name that also maps to this key. This is useful for backwards compatibility when renaming arguments. Example: Key::new("module-path").alias("project-path") This allows both --module-path and --project-path to map to the same config key. The value should then be accessed by using `module-path` The difference between from_clap and alias is that from_clap will work
(mut self, alias_name: impl Into<String>)
| 613 | /// The difference between from_clap and alias is that from_clap will work by mapping |
| 614 | /// a single value from clap, whereas alias will check both of them in the CLI args |
| 615 | pub fn alias(mut self, alias_name: impl Into<String>) -> Self { |
| 616 | self.clap_alias = Some(alias_name.into()); |
| 617 | self |
| 618 | } |
| 619 | |
| 620 | /// Mark this key as module-specific. For example, the `js-bin` config option makes sense |
| 621 | /// only when applied to a single module. The `server` config option makes sense for |
no outgoing calls