Have added configuration options to the k8s module to allow activating
the module only in directories that contains certain files or folders.
To ensure this is backwards compatible and because there are not really
any standard files or folders for Kubernetes I have set the defaults to
empty and will activate the module for all directories.
Have switched all vi/vim symbols to have the same prefix 'vim'. To
preserve backwards compatibility with existing configs I have added an
alias for the previous config name.
* add proper vi mode detection for fish shell
* update tests
* fix test
* update config-schema.json
* update docs
* add warning about symbols only supported in fish
* check for go.work file to display go version
* add test to check for go.work file
* update docs to include go.work file
* chore(dprint): fmt & upgrade plugins (#3969)
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* refactor: replace module_config_derive with serde
Changes include:
* Removing `starship_module_config_derive` and replacing it with `serde::Deserialize`
* Removing `RootModuleConfig::load_config`. While potentially useful, it was only used in tests. And it would require something like `serde::DeserializeSeed` which is not derived by serde.
* Merging `RootModuleConfig` into `ModuleConfig`
* Implementing a `ValueDeserializer` that holds a reference to a `toml::Value` in `serde_utils.rs`
* Deserialization errors (invalid type) are now logged and include the current key and the struct names
* Unknown keys are now considered an error. "Did you mean?"-messages are still possible
* fix typo
Co-authored-by: Matan Kushner <hello@matchai.dev>
Co-authored-by: Matan Kushner <hello@matchai.dev>
* add option to force AWS display
Even if no credentials or credential_process have been setup
* change README wording
* Include sso_start_url in the description
* Change option name to force_display
* feat(haskell): add haskell module and implement ghc version detection
* feat(haskell): implement stack resolver version detection
* fix(haskell): handle more complex resolvers
* fix(haskell): rename resolver_version to snapshot
* fix(haskell): change default color to bold purple
* feat(haskell): add tests
* fix(haskell): format
* fix(haskell): replace incorrect `or` with `or_else`
* fix(haskell): use write_all instead of write
* fix(haskell): λ as Haskell icon by default
* fix(haskell): fix tests and add a real stack.yaml testcase
* fix(haskell): make clippy happy
* Rename m.aws.alias_region to alias_name
* Add aws profile aliases
* Document aws.profile_aliases, with examples
* Add tests for new aws.profile_aliases feature
* Tidy alias_handling a bit
* 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
* 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>
* 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`
* feat: set a continuation prompt for supporting shells (#3134)
* docs: fixed wording of documentation
* fix: continuation prompt is now only set once
* fix(docs): fixed typo in advanced-config/README.md
Co-authored-by: Segev Finer <segev208@gmail.com>
* fix: update --continuation argument
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* fix: updated continuation prompt
- PROMPT2 was fixed to be set only once in zsh.
- `continuation_symbol` and `continuation_format` were removed in
place of a single variable; `continuation_prompt`.
- The continuation prompt was moved out of the character module.
* fix: ran rustfmt
* docs: updated continuation prompt docs
Co-authored-by: Segev Finer <segev208@gmail.com>
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* 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>