starship/.github
Mick Hohmann 43b2d42cd5
feat(hostname): add detect_env_vars as option (#5196)
* Added hostname.detect_env_vars

based on the newly added context::detect_env_vars

- extended context::detect_env_vars to check for negated environment
  variables as well, analogous to the other detect modules
- made hostname.detect_env_vars only active if ssh_only is set to false
  for backwards compatibility

Co-authored-by: Dominik Sander <dsander@users.noreply.github.com>

* added clippy recommendations, removed unneeded comments

* Added new logic (suggested in https://github.com/starship/starship/pull/5196#issuecomment-1566228913)

The new `detect_env_vars` now requires either SSH_ONLY to be false or the
environment variable SSH_CONNECTION to be set, so that is will be used

* Fixed typo

* Refactored the detect_env_vars function for early returns and better readability

* Change boolean logic for better readability

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>

* Apply suggestions from code review to `detect_env_vars` method.

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>

* Fixed bracket error & updated comments

- fixed bracket error in hostname.rs, after changes
- updated comments for context.rs, for the suggested changes

* Removed obsolete warning from docs/config/README.md

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>

---------

Co-authored-by: Dominik Sander <dsander@users.noreply.github.com>
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2023-09-16 16:42:13 +02:00
..
ISSUE_TEMPLATE fix(init): Change Nushell init for nu 0.60 (#3773) 2022-03-24 15:06:24 -04:00
workflows build(deps): update mislav/bump-homebrew-formula-action action to v2.3 2023-09-12 17:06:14 +00:00
FUNDING.yml Update Sponsor badge to support the Starship org 2020-03-19 12:16:30 -04:00
PULL_REQUEST_TEMPLATE.md chore: remove redundant section from PR template (#1253) 2020-05-24 12:12:22 -04:00
config-schema.json feat(hostname): add detect_env_vars as option (#5196) 2023-09-16 16:42:13 +02:00
renovate.json5 chore: use updated gitoxide crate names (#4913) 2023-02-21 13:03:17 +09:00