| title | Windows Terminal Setup |
|---|---|
| description | Configurazione completa di Windows Terminal: temi, font, profili e personalizzazioni |
| icon | 💻 |
| tag | Tutorial |
| date | 2026-01-05 |
import InfoBox from '../../components/InfoBox.astro'; import StepHeader from '../../components/StepHeader.astro';
Guida per configurare PowerShell 7 con autocompletamento, Oh My Posh e icone
winget install Microsoft.PowerShellChiudi e riapri Windows Terminal. Ora vedrai "PowerShell" come nuovo profilo.
Apri PowerShell 7 come amministratore ed esegui:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserConferma con Y quando richiesto.
winget install JanDeDobbeleer.OhMyPoshTesta che funzioni:
oh-my-posh init pwsh | Invoke-ExpressionNecessario per visualizzare le icone nel prompt:
oh-my-posh font installScegli CaskaydiaCove o FiraCode.
Vai in Windows Terminal → Settings → Profiles → Defaults → Appearance → Font face e seleziona il font installato (es. "CaskaydiaCove Nerd Font").Install-Module -Name Terminal-Icons -Repository PSGallery -ForceQuesto file viene eseguito ad ogni avvio di PowerShell:
New-Item -Path $PROFILE -Type File -Force
notepad $PROFILE# Oh My Posh
oh-my-posh init pwsh | Invoke-Expression
# PSReadLine - Autocompletamento
Set-PSReadLineOption -PredictionSource HistoryAndPlugin
Set-PSReadLineOption -PredictionViewStyle ListView
Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward
# Terminal Icons
Import-Module Terminal-IconsCopia questo contenuto nel file e salva.
In Windows Terminal: Settings → Startup → Default profile → seleziona "PowerShell"
In VS Code: Apri settings.json e aggiungi:
{
"terminal.integrated.defaultProfile.windows": "PowerShell"
}Chiudi tutto e riapri Windows Terminal. Verifica con:
# Versione PowerShell (deve essere 7.x)
$PSVersionTable.PSVersion
# Versione PSReadLine (deve essere 2.2+)
Get-Module PSReadLineInstall-Module PSReadLine -Force -SkipPublisherCheckSetup testato su Windows 11 con PowerShell 7