* fix(status): Enable to convert from i64 to hex_status by casting instead of parsing status.
* Apply comment to src/context.rs
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* Update README.md in configuration
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
In #1019 the undistract feature has been added to starship without
enabling it by default due to the system dependency on libdbus. With
recent versions of notify-rust the dependency is no longer required and
the feature can be enabled by default.
* fix: use e718 as the default of symbol in node configuration
* wip: change nodejs symbol in docs/config & add a nodejs symbol configuration in docs/presets
* wip: update CONTRIBUTING.md
* Allow customization of notification timeout
* Document new notification duration option
* Check for out-of-bounds timeout and correct it
* Implement ModuleConfig for u32
* Revert "Check for out-of-bounds timeout and correct it"
This reverts commit 52109ab5f7c336b55c81bccafb3adbfc81514553.
* Switch notification_timeout to u32
* Note notification_daemons might not honor timout
* Notification timeout defaults to daemon timeout
* Leave default value of notification_timeout blank in docs
Have updated the workflow to only run the "Block Translated Changes" job
on PRs since it will fail when run on pushes to a branch. Have fixed the
formatting while I was here.
* test: add mock method for absolute files
Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
* feat(module): add a container indicator module
Adds a container type indicator, if inside a container,
detected via the presence of some marker files.
E.g. inside a podman container entered with `toolbox enter`
the prompt changes to the container name and version.
```
starship on container_rebased [$!] is 📦 v1.0.0 via 🦀 v1.56.1
❯ toolbox enter
starship on container_rebased [$!] is 📦 v1.0.0 via 🦀 v1.56.1
⬢ [fedora-toolbox:35] ❯
```
Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
* Fixed starship config location
config file during creation and when used as export variable into shells are different.
Fixed to make it uniform and avoid errors
* Update README.md
* Update docs/config/README.md
Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
* Update docs/config/README.md
Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
* Update docs/config/README.md
Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
* 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.