14 Commits

Author SHA1 Message Date
hi-rustin
f7579b70d9 replace term with termcolor
- moves terminal into currentprocess abstraction, because termcolor
doesn't accept a file handle, rather it takes an enum indirectly referencing the global state of stdout/stderr.
- provides write/fg/bg/locked etc as before
- abstracts over TestWriter, or termcolor's own concrete types
- still permits completely terminal-free operation where desired (e.g.
  future JSON RPC on stdin/stdout)

Signed-off-by: hi-rustin <rustin.liu@gmail.com>
Signed-off-by: Robert Collins <robertc@robertcollins.net>
2023-05-30 21:18:01 +02:00
hi-rustin
8d61aa3877 Make all src functions and structs crate-private
Signed-off-by: hi-rustin <rustin.liu@gmail.com>

Fmt code

Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2021-08-19 13:52:27 +08:00
Robert Collins
aa1deeb254 Make the CLI code a library
In order to do in-process tests the CLI code must be (mostly) a library.

Thus:
 - rustup-init should moves to the usual place to make this visually
   distinct
 - cli.rs as a mod to define the import
 - 2018 edition changes to the cli code which had not been updated
 - export the needed parts of the cli code such that rustup-init can
   import them
2020-06-04 16:04:53 +12:00
Brian Anderson
43654725f2 Move lib source into src/multirust, cli into src/multirust-cli 2016-03-02 18:45:42 +00:00
Brian Anderson
0edd4c6779 Add list-targets, add-target, remove-target commands
`list-target <toolchain>` lists all the rust-std components available
for an installed toolchain.

`add-target <toolchain> <target>` adds the rust-std component
for a given target to an installed toolchain.

`remove-target` does the opposite.
2016-03-01 02:59:44 +00:00
Brian Anderson
be1c5f6e4f Bump version to 0.0.5 2016-02-26 22:41:01 +00:00
Kamal Marhubi
3fdba3e23f style: Replace tabs by spaces 2016-02-07 22:46:38 -05:00
Brian Anderson
08fd60367e Rustfmt main.rs and cli.rs 2016-02-05 20:09:15 -08:00
Y. T. Chung
b2780401bc ensure new line after help message 2015-10-28 01:21:49 +08:00
Diggory Blake
b7f4b4c923 - Fix multirust doc and add test
- Namespace `install` and `uninstall` within `self` subcommand to avoid confusion with toolchains
2015-10-23 13:00:51 +01:00
Diggory Blake
b889dd5468 Normalize line endings 2015-10-22 22:19:10 +01:00
Diggory Blake
fa0acd7d08 Add CLI tests 2015-10-11 16:10:03 +01:00
Diggory Blake
4627f5a4c6 Update all tracking toolchains on multirust update
Fixes #8
2015-10-11 05:43:06 +01:00
Diggory Blake
d5a80ae35f Fixes #5
Fixes #7
2015-10-09 01:39:43 +01:00