diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index abd84e72..e290ff7f 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -18,6 +18,7 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ && apt-get install -y --no-install-recommends \ fish \ powershell \ + fzf \ && apt-get clean ARG USERNAME=vscode @@ -39,6 +40,12 @@ RUN mkdir /home/${USERNAME}/bin; \ # Windows or Darwin is supported someone will need to improve # the code logic above. +# Setup a neat little PowerShell experience +RUN pwsh -Command Install-Module posh-git -Scope AllUsers -Force; \ + pwsh -Command Install-Module z -Scope AllUsers -Force; \ + pwsh -Command Install-Module PSFzf -Scope AllUsers -Force; \ + pwsh -Command Install-Module Terminal-Icons -Scope AllUsers -Force; + # add the oh-my-posh path to the PATH variable ENV PATH "$PATH:${USERNAME}/bin" diff --git a/.devcontainer/Microsoft.PowerShell_profile.ps1 b/.devcontainer/Microsoft.PowerShell_profile.ps1 index 001cdcb0..f50f1263 100644 --- a/.devcontainer/Microsoft.PowerShell_profile.ps1 +++ b/.devcontainer/Microsoft.PowerShell_profile.ps1 @@ -1,3 +1,11 @@ +Import-Module posh-git +Import-Module PSFzf -ArgumentList 'Ctrl+t', 'Ctrl+r' +Import-Module z +Import-Module Terminal-Icons + +Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete + +$env:POSH_GIT_ENABLED=$true oh-my-posh --init --shell pwsh --config $env:POSH_THEME | Invoke-Expression # NOTE: You can override the above env var from the devcontainer.json "args" under the "build" key.