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

feat: display fancy icons on Windows Terminal #1

Merged
merged 2 commits into from
Jul 4, 2020
Merged

feat: display fancy icons on Windows Terminal #1

merged 2 commits into from
Jul 4, 2020

Conversation

innocenzi
Copy link
Contributor

@innocenzi innocenzi commented Jul 3, 2020

Proposed changes

This change allows to force the usage of the fancy icons via an environment variable, regardless of the current platform. This is because on Windows, the conhost shell does not support them by default (unless you change the font), but the Windows Terminal does. I couldn't find a way automatically detect whether or not the current terminal could handle these icons, so I opted for a flag.

On conhost.exe, some characters were not supported. Because of this, the platform is checked against win32 to determine if the usage of these characters is allowed.

This change updates that behavior by adding an additional check against the WT_SESSION environment variable, in order to allow these characters on the Windows Terminal, which supports them.

Sources:

Related:

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have read the CONTRIBUTING doc
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary documentation (if appropriate)

@innocenzi innocenzi changed the title feat: force fancy icons via environment flag feat: display fancy icons on Windows Terminal Jul 3, 2020
@thetutlage
Copy link
Member

Dope! Thanks for the PR 😄

@thetutlage thetutlage merged commit abef135 into poppinss:develop Jul 4, 2020
@innocenzi innocenzi deleted the feat/icon-env-flag branch November 10, 2020 17:43
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.

2 participants