SHARE
TWEET

Untitled

a guest Oct 10th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Ensure that Get-ChildItemColor is loaded
  2. Import-Module Get-ChildItemColor
  3.  
  4. # Set l and ls alias to use the new Get-ChildItemColor cmdlets
  5. Set-Alias l Get-ChildItemColor -Option AllScope
  6. Set-Alias ls Get-ChildItemColorFormatWide -Option AllScope
  7.  
  8. # Helper function to change directory to my development workspace
  9. # Change c:\ws to your usual workspace and everytime you type
  10. # in cws from PowerShell it will take you directly there.
  11. function cws { Set-Location c:\ws }
  12.  
  13. # Helper function to set location to the User Profile directory
  14. function cuserprofile { Set-Location ~ }
  15. Set-Alias ~ cuserprofile -Option AllScope
  16.  
  17. # Helper function to show Unicode character
  18. function U
  19. {
  20.     param
  21.     (
  22.         [int] $Code
  23.     )
  24.  
  25.     if ((0 -le $Code) -and ($Code -le 0xFFFF))
  26.     {
  27.         return [char] $Code
  28.     }
  29.  
  30.     if ((0x10000 -le $Code) -and ($Code -le 0x10FFFF))
  31.     {
  32.         return [char]::ConvertFromUtf32($Code)
  33.     }
  34.  
  35.     throw "Invalid character code $Code"
  36. }
  37.  
  38. # Ensure posh-git is loaded
  39. Import-Module -Name posh-git
  40.  
  41. # Start SshAgent if not already
  42. # Need this if you are using github as your remote git repository
  43. if (! (ps | ? { $_.Name -eq 'ssh-agent'})) {
  44.     Start-SshAgent
  45. }
  46.  
  47. # Ensure oh-my-posh is loaded
  48. Import-Module -Name oh-my-posh
  49.  
  50. # Default the prompt to agnoster oh-my-posh theme
  51. Set-Theme Paradox
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top