Remove extra backspace from regex in example
In the example, `[\\w-]` would match a literal backspace `\`, the
character `w` or a dash `-`. By removing the backspace, instead it
matches any "word character" `\w` or a dash `-`.
* feat: Pijul VCS support
* Extra bits needed for new module.
* Format Markdown table.
* Fix lint.
* Don't test Pijul module so thoroughly.
Installing from source is too expensive, and compiled binaries are only
available for Windows (and unofficially as well). Perhaps once Pijul
1.0.0 comes out of beta there will be more binaries available in package
repos.
* Format!
* Bad rebase, remove Pijul install from workflow.
* Mock Pijul commands for code coverage.
* Make fake .pijul directory in fixture.
* Truly mock `pijul` command.
* Rename module from `pijul` to `pijul_channel`.
* Format!
* Fix config-schema.json.
* Missed changing module name in docs/ folder.
* feat(hg_branch): Add support for mercurial topics and find hg root dir
* Fix clippy errors
* Use crate::utils::read_file
* Update config-schema.json
* Extend PathExt to retrieve device ID of Path
* Break hg root search when switching to another device
* Fix clippy and formatting errors
* Update docs/config/README.md
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* Update src/modules/utils/path.rs
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* Update src/configs/hg_branch.rs
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* Update hg_branch description
* Revert to lazy loading, use truncate_text from utils and use fake topic
* Format code and fix clippy error
* Revert to previous test string as topic is optional in the config
* Fix doc formatting
* Stub device_id for windows
* Update config-schema.json
* Update src/modules/hg_branch.rs
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* Do not use unwrap in device_id
* Fix formatter error
* Use dev under non linux unixes
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* Support `nix shell`
* Remove unnecessary `Debug` implementation
* Add test to detect false positive
* Improve detection of `/nix/store` in $PATH
* Add docs about unknown state
* Gate under `heuristic` flag
* Regenerate config schema
The `git_commit` module uses a `tag` variable in its format string,
which is not explained in the Variables section of this module.
Missing clarification of this `tag` variable is added to the
documentation of the `git_commit` module.
Fixes starship/4640
* Add Haxe support
* avoid unwrap
* fix doc formatting
* removed extra newline
* fixed formatter and linter issues
* fixed config file
* better version of detecting contents of .haxerc
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* removed openfl related defaults from detect_files
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* fixed formatting
* reworked reading .haxerc with fallback to haxe --version
* fixed formatting
* added fallback to executable for dev paths in .haxerc
* fixed linter issue
* added support for Windows paths
* use or_else
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* use shorter version with `?`
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* simplified regex check
removed check for "null" string
* fixed format
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* add username to azure module config
* add username to azure module config
* formatting with cargo fmt
* Handle parse failure on azureProfile.json
allow program to procede if unable to parse azure profile due to missing
keys from the JSON structure.
remove unused keys from struct
Code cleanup with suggestions from PR maintainer
Cargo clippy fixes
* feat(preset): Add No Empty Icons preset
When toolset files are identified by the Starship module, the default format displays the toolset icon, and additional information.
When the toolset executables are not available, the additional information (like version number) is missing. Only the toolset icon is displayed.
The No Empty Icons preset changes the format configuration to not show the toolset icons if the variables are empty - presumably because the toolset is not installed or found.
Closes #3070
Related #3248
* Remove non-version-related modules from preset
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* Add new module opa to preset
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* Drop unnecessary inner conditional from format
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* Remove commit_hash_length setting from preset
* Remove undesired modules
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* docs(config): Improve string and escaping information
* docs(config): Use literal strings
* docs(config): Use literal strings
* docs(config): Improve string value type description
* docs(config): Consistently use literal strings
like the documentation recommends and like `starship print-config` prints.
Resolves inconsistencies to format value on aws, container, elixir, gcloud, git_commit, git_state, git_status, kubernetes, nix_shell, openstack, python, singularity, which already uses literal strings.
Resolves inconsistency to status module pipestatus_format, which already uses literal string.
`$all` expanded list remains a non-literal multiline string for readability with escaped newlines.
* docs(config): Drop literal recommendation, describe escaped newlines
* feat(preset): Add powerline-only-symbols preset
Related to #2563 & #3544
* Modify symbols for pulumi and erlang
* Change some wording and add default notification
* Update name of preset
Co-authored-by: Kevin Song <chips@ksong.dev>
In the config `$all` has special meaning, as it is and contains the default value for `format`.
Using `$all` in the example for conditional format strings with multiple variables is thus potentially misleading and confusing.
Using a neutral variable `$combined` has no conflict with other meanings and is thus preferable.
* feat(guix_shell): Initial implementation (#3999)
* fix(guix_shell): Change guix nerd font icon to water buffalo emoji
* fix(guix_shell): Added guix_shell entries in preset files
* fix(guix_shell): Moved guix_shell config docs in to the correct place (alphabetically)
* feat(aws): add a fallback for `expiration`
* fix(aws): intermittent test failures
- extend the time range from `-2s,0s` to `-5s,+2s`
* fix: `docs/config/README.md` readability
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* feat: Open Policy Agent module (#1740)
* Format documentation
* Fix typo, `ropa` -> `rego`
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* Update presets for OPA module
* Add extra space to OPA module symbol
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* docs(preset): update presets with Scala nerd font.
* dos(preset): add an extra space after Scala symbol.
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* feat(module): Add a meson devenv indicator
Adds a Meson Developer Environment indicator, if the MESON_DEVENV
variable is set. Inside a `meson devenv`, the prompt will include the
current Meson project name
This also contains a new Truncate utility function, which may be adapted for other modules in the future
* docs: Add Meson to presets