Guest User

Untitled

a guest
Aug 22nd, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. Import-Module 'posh-git'
  2. Import-Module 'oh-my-posh'
  3. Set-Theme agnoster
  4.  
  5. # Set l and ls alias to use the new Get-ChildItemColor cmdlets
  6. Set-Alias l Get-ChildItemColor -Option AllScope
  7. Set-Alias ls Get-ChildItemColorFormatWide -Option AllScope
  8.  
  9. # Helper function to change directory to my development workspace
  10. # Change c:\ws to your usual workspace and everytime you type
  11. # in cws from PowerShell it will take you directly there.
  12. function cws { Set-Location c:\ws }
  13.  
  14. # Helper function to set location to the User Profile directory
  15. function cuserprofile { Set-Location ~ }
  16. Set-Alias ~ cuserprofile -Option AllScope
  17.  
  18. Set-PSReadlineOption -EditMode Emacs
  19. Set-PSReadlineKeyHandler -Key 'Ctrl+p' -Function HistorySearchBackward
  20. Set-PSReadlineKeyHandler -Key 'Ctrl+n' -Function HistorySearchForward
  21.  
  22. Set-Alias -name g -value git
  23.  
  24. function gh () {
  25. cd $(ghq list --full-path | peco)
  26. }
  27.  
  28. Set-Alias -name open -value Invoke-Item
  29.  
  30. function U {
  31. param
  32. (
  33. [int] $Code
  34. )
  35.  
  36. if ((0 -le $Code) -and ($Code -le 0xFFFF))
  37. {
  38. return [char] $Code
  39. }
  40.  
  41. if ((0x10000 -le $Code) -and ($Code -le 0x10FFFF))
  42. {
  43. return [char]::ConvertFromUtf32($Code)
  44. }
  45.  
  46. throw "Invalid character code $Code"
  47. }
  48.  
  49. $Env:Path += ";C:\Program Files (x86)\Yarn\bin"
  50. $Env:Path += ";C:\Program Files\dotnet"
Add Comment
Please, Sign In to add comment