Skip to content

Instantly share code, notes, and snippets.

@hugefiver
Last active October 16, 2022 10:42
Show Gist options
  • Save hugefiver/e69e49512c1399ba9e391f7eb8118eb0 to your computer and use it in GitHub Desktop.
Save hugefiver/e69e49512c1399ba9e391f7eb8118eb0 to your computer and use it in GitHub Desktop.
posh env
# Install autocomplete
#Install-Module PSReadLine
# install PSReadLine
#Install-Module -Name PSReadLine
# autocomplete
Import-Module PSReadLine
Set-PSReadLineOption -PredictionSource History
# ohmyposh
#oh-my-posh --init --shell pwsh --config ~/theme.omp.json | Invoke-Expression
oh-my-posh --init --shell pwsh --config ~/negligible.omp.json | Invoke-Expression
#oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/negligible.omp.json" | Invoke-Expression
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineKeyHandler -Key "Ctrl+d" -Function MenuComplete
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward
# remove alias
Remove-Item alias:\diff -Force
# Remove-Item alias:\iex -Force
#region conda initialize
# !! Contents within this block are managed by 'conda init' !!
(& "~\scoop\apps\miniconda3\current\Scripts\conda.exe" "shell.powershell" "hook") | Out-String | Invoke-Expression
# not use base
# `conda config --set auto_activate_base false` is not compatible with ohmyposh
conda deactivate
#endregion
# jabba
if (Test-Path "~\.jabba\jabba.ps1") { . "~\.jabba\jabba.ps1" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment