Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distinguish between pwsh and powershell #5156

Closed
wants to merge 303 commits into from
Closed

Distinguish between pwsh and powershell #5156

wants to merge 303 commits into from

Conversation

HeyItsGilbert
Copy link
Contributor

@HeyItsGilbert HeyItsGilbert commented Apr 30, 2023

Description

pwsh.exe and powershell.exe are currently both identified as powershell. This PR intends to distinguish between the two in the shell module (as well as make the necessary context changes to allow for that)

This is a copy of #5031 which was in draft. Hopefully I did this right....

Motivation and Context

Distinguishes between pwsh and powershell shell instances. A Windows machine can have both and having a clear distinction can avoid issues.

Closes #5031

Screenshots (if appropriate):

How Has This Been Tested?

  • I have tested using MacOS
  • I have tested using Linux
  • I have tested using Windows

Checklist:

  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.

@HeyItsGilbert
Copy link
Contributor Author

One obvious place this will likely need additional work is on all the help docs across the different languages. Just wanted to get an idea of I'm at least heading in the right direction before updating all of those. Thanks for starting this @wmmc88 !

@davidkna
Copy link
Member

@HeyItsGilbert Translation is handled exclusively on crowdin. Regarding any new options, please keep them compatible with what is already there, e.g., by having any new option default to the old option value.

@HeyItsGilbert
Copy link
Contributor Author

Reverted some of the renames to match the existing name. Tried to rebase and squash the commits. Hopefully I didn't screw it up.

@wmmc88
Copy link

wmmc88 commented Oct 2, 2023

hey @HeyItsGilbert! are you planning on landing this?

@HeyItsGilbert
Copy link
Contributor Author

I think I was waiting on an approval. I'll rebase since this is super old. We'll see what the tests come back with.

AnirbanHalder654322 and others added 24 commits October 3, 2023 02:10
* Adding documentation

* Documentation and schema addition

* Creating solidity config

* Module for solidity lang

* Updating all the files

* Changing according to clippy

* Fixing misspellings

* Changes suggested by clippy

* Updating schema , maybe fixing docs workflow error

* Updating schema

* Removing solcjs from default compiler list

* Fallback test added and test string fixed

* Fixing docs

* Updating schema

* Updating schema

* Fixing docs

* Updating schema

* Updating schema

* Typo fix

* Update docs/config/README.md

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

* Update src/utils.rs

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

* Fix build commit

---------

Co-authored-by: Anirban Halder <shaeo967@gmail.com>
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
…5125)

docs: fix PowerShell example to update the window title
…ting (#5120)

fix: ensure nested style variables are processed during formatting
* add `set_config` method to `Context`

* Made inline comment a doc comment

* use `default_context()` for `set_config()` test

* use `set_config()` in tests for `print.rs`

* set root config w `set_config()` (`print.rs` test)
…uring discovery (#5141)

upgrade gitoxide to v0.44 for performance improvements during discovery

Please note that there is a new `dot_git_only` option which would further
speedup discovery. On even moderatly fast disks that probably not going
to make a difference, but it will on incredibly slow (networked) disks.

See helix-editor/helix#6867 for reference.
davidkna and others added 25 commits October 3, 2023 02:10
* build(deps): update rust crate indexmap to v2

* enable `indexmap2`-feature in `schemars`

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This also reduces the binary size from

-rwxr-xr-x  1 byron  staff  6482184 Sep  9 08:52 ./target/release/starship

to

-rwxr-xr-x  1 byron  staff  6399544 Sep  9 08:56 ./target/release/starship
* 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 #5196 (comment))

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>
…5455)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* fix: Change how starship version is determined

* Add STARSHIP_VERSION envar into CI for notarization

* More strict!

* Supress pushd/popd output

* Fix shellcheck issue with quoting
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@HeyItsGilbert
Copy link
Contributor Author

Well I totally screwed up my rebase... I need to go RTFM on how to rebase. I made a huge mistake making my upstream be your change @wmmc88 . My bad.

@HeyItsGilbert HeyItsGilbert closed this by deleting the head repository Oct 3, 2023
@HeyItsGilbert
Copy link
Contributor Author

Dumped my entire repo because I totally screwed it up. Fresh repo. #5478 is my do-over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet