Skip to content

Files

Latest commit

92d3e5b · Jan 20, 2023

History

History
125 lines (77 loc) · 2.86 KB

README.md

File metadata and controls

125 lines (77 loc) · 2.86 KB

terminal screenshot

Windows PowerShell Customization

Set up Windows Powershell for FISH(Friendly Interactive Shell) shell workflow.

Followed tutorial from @devaslife. His repository.

⚠️ Follow Oh My Posh oficial site documentation for installation.

Features:

  • Customizable theme for powershell
  • Directory jumping with z
  • filtering tool with fzf
  • Exemples of aliases for commands

Install scoop command-line installer for windows:

iwr -useb get.scoop.sh | iex

For installations that require user administrator, install sudo. Shows UAC popup window. An Aproximation of the unix sudo command:

scoop install sudo

Optional installacion of a vim editor:

scoop install neovim gcc

Installation of a prompt theme for the shell:

scoop install https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/oh-my-posh.json

📝 Copy the content from /.config/powershell/ of the repository to ~\.config\powershell\

Open the next file:

nvim $PROFILE.CurrentUserCurrentHost

Next add this line to the file:

. $env:USERPROFILE\.config\powershell\user_profile.ps1

Install Oh My Posh (Prompt theme engine):

Install-Module posh-git -Scope CurrentUser -Force
Install-Module oh-my-posh -Scope CurrentUser -Force

Install Terminal Icons:

📝 working directory ~\.conf\poweshell

Install-Module -Name Terminal-Icons -Repository PSGallery -Force

Import-Module Terminal-Icons

Install z directory jumper. Tracks most used directories and makes use of regex for matches:

Install-Module -Name z -Force

Exemple of use:

cd ~\.config\powershell
cd ~
z powershell

if not installed by default proceed to installation:

Install-Module -Name PsReadLine -AllowPrerelease -Scope CurrentUser -Force -SkipPublisherCheck

Set-PSReadLineOption -PredictionSource History

Set-PSReadLineOption -PredictionViewStyle ListView

Install filter for command-line:

  • ctrl+r to search command history
  • ctrl+f to search files ...
 scoop install fzf

 Install-Module -Name PSFzf -Scope CurrentUser -Force

 Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+f' -PSReadlineChordReverseHistory 'Ctrl+r'