Git Product home page Git Product logo

type-pwsh's Introduction

Type-Pwsh

github-actions github-release powershell-gallery-release

Type pwsh like you would type any language ๐Ÿ™ƒ.

Install

Open powershell or pwsh and type:

Install-Module -Name Type-Pwsh -Repository PSGallery -Scope CurrentUser -Verbose

If prompted to trust the repository, hit Y and enter.

Examples

Import-Module Type-Pwsh

# Let's try to find out what something is
what is 240,159,144,145

# Let's try and find out more
tell me what is 240,159,144,145
tell me what could be 240,159,144,145

# And even more
explain what is 240,159,144,145
# X.X

type-pwsh's People

Contributors

leojonathanoh avatar

Watchers

 avatar

type-pwsh's Issues

powershell <= 5.1 not recognizing .ps1 script as UTF-8 when BOM is absent

Bug

powershell <= 5.1 not recognizing .ps1 script as UTF-8 when BOM is absent, leading to failing tests.

Expectation

powershell <= 5.1 not failing tests.

Discussion

Tests failing: https://github.com/leojonathanoh/Type-Pwsh/actions/runs/813604261

See https://stackoverflow.com/questions/14482253/utf8-script-in-powershell-outputs-incorrect-characters

It seems PowerShell cannot guess correctly the encoding of UTF-8 files with no BOM.
In my case the problem was caused by creating a new PowerShell script with Visual Studio Code which has the default encoding of UTF-8 without BOM. Set the encoding to "Windows 1252" solved the problem.

It seems that PowerShell can't handle UTF-8 without BOM, it needs "Windows 1252" or "UTF8 with BOM" encodings.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.