/ps-gitprofile

Automagically sync your PowerShell profile across Linux, Windows and Azure Cloud Shell.

Primary LanguagePowerShell

ps-gitprofile

Automagically sync your PowerShell profile across Linux, Windows and Azure Cloud Shell.

To run at your current PowerShell6 prompt, simply type:

iwr is.gd/pshgit | iex

This will give you the default profile and pre-load the functions in the !required folder.

You can load additional functions by running . Import-GitFunction Function-Name. (Note you need to dot-source the Import-GitFunction command to make the function available in your current session!)

This mode is referred to as "non-persistent" mode since all the loaded functions and settings automatically disappear when you close your session. It's also a great way to try out the profile and see if you like it!

To make ps-gitprofile your default profile, run the above command then

Initialize-GitProfile 

This will also give you the option to automount your Azure Cloud Shell drive on every execution. In order to do that, you'll need the following information (which will then be stored in PLAINTEXT in your PowerShell $profile -- you've been warned!)

  • Azure Cloud Shell Storage Account Name & Shared Folder Name
  • Azure Cloud Shell Storage Account Key

Finally, for advanced users you can clone this repo and change the $env:gitProfile variable at the top of profile.ps1 to point all the defaults to your repository instead.

#TODO: