diff options
| author | bors <bors@rust-lang.org> | 2014-01-11 10:21:22 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-01-11 10:21:22 -0800 |
| commit | 91aec7c8a65db0768fdccc29706cba731101f7fc (patch) | |
| tree | 8994b45e73cec6cd7ac674bab82e7c1785c00dc7 /src/librustpkg/context.rs | |
| parent | 29e82c65b47130fb431aaca0b33935ecfcd09d85 (diff) | |
| parent | dc21ca98331f181fabefe25f31464ff920f805fd (diff) | |
| download | rust-91aec7c8a65db0768fdccc29706cba731101f7fc.tar.gz rust-91aec7c8a65db0768fdccc29706cba731101f7fc.zip | |
auto merge of #11470 : eminence/rust/rustpkg_help_test, r=alexcrichton
In general, you can run "rustpkg help <cmd>" to see some specific usage information for <cmd>. However, this was handled in a very ad-hoc and buggy manner. For example, running "rustpkg help prefer" would actually show you the usage information for the "uninstall" cmd. Or "rustpkg help test" would show you the usage information for the "build" command. Or "rustpkg help list" would just run the "list" command (and not show you anything usage information) This commit attempts to fix this by making a new HelpCmd (and handling it explicitly)
Diffstat (limited to 'src/librustpkg/context.rs')
| -rw-r--r-- | src/librustpkg/context.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/librustpkg/context.rs b/src/librustpkg/context.rs index 51b42869c75..5362ca2c932 100644 --- a/src/librustpkg/context.rs +++ b/src/librustpkg/context.rs @@ -229,12 +229,13 @@ pub enum Command { BuildCmd, CleanCmd, DoCmd, + HelpCmd, InfoCmd, + InitCmd, InstallCmd, ListCmd, PreferCmd, TestCmd, - InitCmd, UninstallCmd, UnpreferCmd, } @@ -246,6 +247,7 @@ impl FromStr for Command { &"build" => Some(BuildCmd), &"clean" => Some(CleanCmd), &"do" => Some(DoCmd), + &"help" => Some(HelpCmd), &"info" => Some(InfoCmd), &"install" => Some(InstallCmd), &"list" => Some(ListCmd), |
