This updates the default AWS default symbol to include a space after the
symbol to make it a little bit more readable. Have also updated the
README to include the AWS module.
Structure the prompt as a function that returns a string instead of writing directly to stdout.
This makes it easier to embed Starship into other Rust programs such as shells written in Rust. It also decouples the arguments from the context for more programmatic initialization of the context.
Implements the Default trait for SegmentConfig to clean up construction of empty segments.
Also adds a segment::new() function to ease construction of simple segments.
Given the global nature of the Kubernetes module, the module has been disabled by default. The opportunity has also been taken to refactor the Kubernetes module to use the new config module.
Adds the ability to style individual segments in the prompt.
The segment documentation is not fully updated in this commit and is waiting on
a config refactor so that we can write unified docs.
Prevents the rust module from installing rustup toolchains.
Previously, the rust module would trigger rustup toolchain installations in some cases,
leading to frozen prompts while rustup downloads/installs components. This commit
changes the behaviour to avoid this.
- Replaced for loop that iterates over mutable state with a fold expression
- Unified the logging for the different accessors. The code is now screaming for further refactoring (get_module_config, get_as_bool, get_as_str, get_as_i64 and get_as_array are basically the same up to higher order functions but I didn't manage to get the life times right)
- Increased test coverage (especially a test case for none not at the end)
- Removed code comments that literally repeated the code in the next line (see e.g. https://blog.usejournal.com/stop-writing-code-comments-28fef5272752)
- Added TODO for the problematic line that swallows the None and produces Some(Style::new()) (this also happened before but in a less obvious way)
Previously, a set of empty segments would cause the module to print. This changes the
logic of Module::is_empty to check that all the segments are empty instead.
Shell inits are now in a separate directory in the source code, with each shell getting its own script. Also adds a little DRY + commenting in init/mod.rs.