* break long commands into multiple lines for readability
* fix the format of closures
We generally write `{|| ...}` instead of `{ || ...}`.
* remove the `$"--opt=(val)"` structure when possible
`starship` does not require to use `--opt=val` and so we do not
need to do that with Nushell :)
the only place where this is required is with `--status` because
`$env.LAST_EXIT_CODE` can be negative and `starship` does not
appear to *like* values of the form `-2`...
so i left this line as it was.
on the other hand, `$env.CMD_DURATION_MS` and `(term size).columns`
should be fine 😌
* simplify the `config` mutation with new `?` syntax
This is a new very handy feature of Nushell which gives a much
simpler command combined with `default` and `merge`.
* put all `let-env`s inside an `export-env` with `load-env`
This commit has two reasons of existing:
- i think it makes it a bit easier to read with less `let-env`s
- it transforms the *script* into both a valid module and a valid
overlay
* bump the version to `0.78` in to docs
* add a note about the init file being also a module to all docs
* tweak the documentation
* update the Nushell part of the install script
* format the vuepress config file
as previous commit 117580136d3da5e00a4ccb7ada508c8510a2e50e was
not successful, let's try to make the CI happy manually 😌
* remove code quotes in the `config_cmd` of Nushell
* format the style in the Nushell `warning` section
* add `expected_version` variable to `nodejs`
* show comparison symbols with `expected_version`
* documentation, formatting, more tests
* Remapped `engines_version` to $version
* Added better descriptions to docs
* Update docs/config/README.md
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* Removed clone from `nodejs`, formatting
* refactored function calls
* rewrote `engines_version` formatter
* Moved Lazy variables into maps
---------
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* Updated nf-mdi-* to nf-md-* symbols
The following symbols where changed
- directory.read_only
- memory_usage
- meson
- nim
- os.symbols.Garuda
- os.symbols.HardenedBSD
- os.symbols.Illumos
- os.symbols.OpenBSD
- os.symbols.OracleLinux
- os.symbols.Redox
- os.symbols.Solus
- os.symbols.Windows
- package
- rlang
* Updated nf-mdi-* to nf-md-* symbols (for all other presets)
The following symbols where changed
for pastel-powerline:
- directory.substitutions.Documents
- nim
for tokyo-night
- directory.substitutions.Documents
- golang
* Updated nf-mdi-* to nf-md-* symbols for the default configuration in modules in src/configs/*.rs
The following symbols where changed
- azure
- battery.full_symbol
- battery.charging_symbol
- battery.discharging_symbol
- battery.unknown_symbol
- battery.empty_symbol
* Updated config-schema.json
* Updated src/modules/*.rs docs/config/README.md
and used `nerdfix` to check if I overlook anything
* Fixed the battery discharging symbol in the tests
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: jtrv <travershasemail@gmail.com>
* Fixed error in module 'sudo'
There was no ($style) in format. When module enabled this lead to the error [WARN] - (starship::modules::sudo): Error in module `sudo`
* Update docs/.vuepress/public/presets/toml/bracketed-segments.toml
typo fix
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
---------
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* From issue #4448, added `subscription_aliases`
as a field for the Azure module
Can be set in starship.toml with
[azure.subscription_aliases]
* Updated config file schema
* Added entry into documentation
* Update README.md
* Formatted with dprint
* feat(custom): add option to check if pwd is in a repo
* Apply suggestions from code review
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* change whenrepo to require_repo
* chore: fix doc formatting
---------
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
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