Coder Social home page Coder Social logo

powershell-profile's Introduction

PowerShell Profile

This is the repository for my profile.ps1 file. I use it for both Windows PowerShell 5.1 and PowerShell (Core/6+) and all PowerShell hosts (Windows Terminal, VSCode, etc.).

I keep unified *profile.ps1 files at a custom location: MyPowerShell, sibling to the PowerShell and WindowsPowerShell folders under "My Documents". The default profile locations have files which then dot-source files of the same name in the MyPowerShell directory. The contents of all those files are contained in redirect.profile.ps1.

Features

The goal with this profile is to provide small enhancements which make for a more pleasant terminal experience without going overboard on the level of customization in the vein of Oh My Posh. If it were to be branded, 'Default Plus' would be a good name.

The sub-sections below are out of date, I'll fix them up eventually.

Aliases

  • Get-Help is abbreviated to gh

Default Parameters

  • Get-Help has -ShowWindow applied to keep a cleaner terminal buffer.

Prompt

  • The major version of PowerShell is appended to 'PS' at the beginning of the prompt and if the terminal supports ANSI control characters, it is stylized to reduce visual prominence.
  • If the PowerShell session is running in an Administrator context, "$env:username@" is prepended to the path as a reminder that commands will be run in that context.
  • If the prompt will exceed half the width of the terminal, the path will be truncated as necessary while retaining context.
  • If the terminal supports ANSI control characters, the posh-git module has been imported, and the current location is a Git repository, the Git status will be appended to the path.

powershell-profile's People

Contributors

cthompson-ocadu avatar

Watchers

Chris Thompson avatar

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.