项目作者: jfishe

项目描述 :
PowerShell Core Profile
高级语言: PowerShell
项目地址: git://github.com/jfishe/PowerShell.git
创建时间: 2020-06-06T17:47:09Z
项目社区:https://github.com/jfishe/PowerShell

开源协议:MIT License

下载


PowerShell Core Profile

PowerShell Core Profile Installation

Install-Profile installs module PSDepend and uses Invoke-PSDepend to
install the modules in profile.Depend.psd1.

Starship: Cross-Shell Prompt works well in zsh,
powershell and pwsh.

  1. # Assume Documents\PowerShell does not exist.
  2. $ProfileDir = Split-Path "$PROFILE"
  3. git clone https://github.com/jfishe/PowerShell.git "$ProfileDir"
  4. if ($?) {
  5. pushd $ProfileDir
  6. # Install `direcolors`.
  7. git submodule update --init
  8. cmd /c "mklink $HOME\.dircolors $ProfileDir\PowerShell\dircolors-solarized\dircolors.ansi-universal"
  9. .\Install-Profile.ps1
  10. } else {
  11. Write-Error -Message "Failed to install $ProfileDir"
  12. }

PowerShell Core Installation and Update

Installing PowerShell on Windows
describes the Microsoft recommended method.

  1. # Chocolatey can manage installation/updating.
  2. choco install powershell-core `
  3. --install-arguments='"ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1
  4. REGISTER_MANIFEST=1
  5. "' `
  6. --packageparameters '"/CleanUpPath"'

Windows Terminal

WindowsTerminal does not distinguish
Shift+Enter (\u001b[13;2u) or
Ctrl+Enter (\u001b[13;5u), and
reserves Alt+Enter for Toggle fullscreen.
Reddit user desgreech posted a solution to r/neovim
using sendInput.
The JSON schema splits actions and keys now,
so modify the solution accordingly in settings.json.

Windows Terminal Preview

  1. $PreviewSettingsJSON = "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminalPreview_*\LocalState\settings.json"

Windows Terminal Release

  1. $SettingsJSON = "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_*\LocalState\settings.json"

WindowsTerminal\Install-WindowsTerminalSettings.ps1
links $SettingsJSON to
WindowsTerminal\settings.json, saving the
current settings.json as settings.json.bak.

WindowsTerminal JSON Fragment Extensions