* feat: add support for cmd
* add preprompt and precmd support
* add keymap support
* add info about minimum Clink version
* simplify escaping
* add handling for cmd custom commands
* add support for transient_prompt and transient_rprompt
* Revert 914057952508e81e20086fcb707ba2a0be85fdd3
This reverts commit "add support for transient_prompt and transient_rprompt"
* Apply suggestions from code review
* disable cmd shell custom commands
* any shell other than cmd can be used
* better error and correct script location
* move shell check in `map_no_escaping`
* perf(git_status): tweak flags to omit extra info
`git status` can be prohibitively slow on some repos, so allow the
config to influence what flags are passed to git. For instance, if there
is no configured symbol for untracked files, tell git to omit them from
its output. This can easily result in a 2~10x speedup in many cases, but
requires the user to opt-in to hiding information from the prompt.
* docs(git_status): add ignore_submodules option
* feat: Experimental Windows path formatting via path_slash::PathBufExt
* Rework the slash path conversion into a real PR
* Add a test for convert_slash = false
* Attempt fixing CI failures
* Fix lint and fmt
* Fix docs/config/README.md getting messed up
* Rename convert_slash/from_slash
* Move convert_path_sep calls in tests
* Keep path_vec immutable
* Run rustfmt
* add feature - sudo module
* add sudo module identifiers and entry point
* fix test test_sudo_not_cached
* add test test_sudo_cached
* add `allow_windows` and `binary` options
* rustfmt sudo_x_cached and rmv them on windows
* add false `allow_windows` block windows test
* add `doas` cached/not_cached tests
* better description in `starship explain`
* fix `test_doas_cached` with `-n` flag
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* rmv `binary` alternatives and their tests
* fix symbol and update config/README
* fix all mocks to use `sudo -n true`
* fix expected output in `test_sudo_cached`
* proper checking for blocked sudo
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* add `allow_windows = true` to non-windows tests
* allow sudo_* tests to run on windows + fix parsed
* rustfmt `blocks_windows` test
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* add crystal shard (package) version support
* module package: crystal shard version: read shard.yml directly
* module package: add test for crystal shard version
* format src/modules/package.rs
* use yaml-rust instead of serde-yaml
* document shards package support
* Update docs/config/README.md
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
Have updated which extentions trigger the terraform module, to remove
the `hcl` since this gives false positives as it is used by other
Hashicorp products and add the `tfstate` and `tfplan` which are more
accurate indicators.
* Correct the "VLang" configuration example
This commit is a document correction only; to avoid the configuration error.
The documents to be corrected are "docs/[lang]/README.md".
With a config key of `[v]` on macOS, it has the following error.
```
[WARN] - (starship::configs::starship_root): Unknown config key 'v'
```
I think it might be the error in other OS as well.
In the other document "docs/[lang]/presets/README.md", the config key is `[vlang]`.
* Touch only the English docs
The changes to the translated pages will be done automatically.
Have added version formatting to the red and vlang modules. Note the
docs for red already mentioned the `version_format` string but it had
not actually been added.
* feat: Add the symbol and number thresholds respecting the threshold option
* fix: Maintain the old behavior + add lots of tests
* docs: Fix the jobs module documentation
* git_status: added symbol for when local branch is up-to-date with upstream
* updated docs
* removed unused variable, moved location of config comment
* changed uptodate default to empty string, simplified and made safer
* added uptodate default line back into docstring
* fixed linting and formatting errors
* refactored uptodate to up_to_date, removed redundant else statement
Have added the ability to use format the version of the package using
the `version_format` option. While doing this I have also done some
refactoring of the module to remove the if/else if/... block and replace
it with an iterator. This should make fix some edge cases where versions
are not correctly picked up due to other files an example would be a
python project that has a `pyproject.toml` file but using the
`setup.cfg` for the package version. It should also make it easier to
make the order of the list configurable in the future.
* feat: Add pipestatus display in status module
This MR is based on this one https://github.com/starship/starship/pull/370
* Documentation
* Add a test with map_symbol false
* Handle bash preexec pipestatus
* Add zsh support
* Add fish support
Thanks kidonng for the diff patch
* Rename sucess_symbol to success_symbol
* Support package version from setup.cfg (python).
Add an additional package version extraction function to parse
the 'version' attribute under the 'metadata' section in a python
package 'setup.cfg' file.
Also add similar tests from the poetry extraction function to test
the desired behaviour.
This adds a dependency on ConfigParser:
https://crates.io/crates/configparser.
* Clean up comments
* Use rust_ini over ConfigParser
* Add mention to setup.cfg version parsing in docs
* feat: add support for xonsh
* xonsh: add STARSHIP_SESSION_KEY
* xonsh: implement STARSHIP_SESSION_KEY in xonsh
* docs: mention tcsh, elvish, and nu in more places
* xonsh: change STARSHIP_SESSION_KEY implementation
See https://github.com/starship/starship/pull/2807#discussion_r667064149
* xonsh: fix jobs implementation
* xonsh: do not silently discard stderr from starship
This PR adds a new module named git_metrics. It shows the added/deleted lines in the current git repository following the format: "[+$added_lines]($added_style) [-$deleted_lines]($deleted_style)".