Compare commits

...

2 Commits

Author SHA1 Message Date
Mikael CAPELLE
bbd7660c0a Add glab auto-completion. 2023-07-03 18:09:27 +02:00
Mikael CAPELLE
c35e62cc96 Fix theme for Git. 2023-07-03 16:44:21 +02:00
2 changed files with 27 additions and 11 deletions

View File

@ -8,13 +8,12 @@ $env:VIRTUAL_ENV_DISABLE_PROMPT = "True"
oh-my-posh init pwsh --config (Join-Path $profile_folder theme.omp.json) | Invoke-Expression oh-my-posh init pwsh --config (Join-Path $profile_folder theme.omp.json) | Invoke-Expression
function docker {
wsl -- docker $args
}
Import-Module posh-ssh Import-Module posh-ssh
Import-Module posh-venv Import-Module posh-venv
Import-Module DockerCompletion Import-Module DockerCompletion
Import-Module Set-PsEnv
Enable-Dotenv
Set-PSReadLineOption -PredictionSource History Set-PSReadLineOption -PredictionSource History
Set-PSReadLineOption -HistorySearchCursorMovesToEnd Set-PSReadLineOption -HistorySearchCursorMovesToEnd
@ -31,3 +30,7 @@ if (Get-Command kubectl -ErrorAction SilentlyContinue) {
if (Get-Command helm -ErrorAction SilentlyContinue) { if (Get-Command helm -ErrorAction SilentlyContinue) {
helm completion powershell | Out-String | Invoke-Expression helm completion powershell | Out-String | Invoke-Expression
} }
if (Get-Command glab -ErrorAction SilentlyContinue) {
glab completion -s powershell | Out-String | Invoke-Expression
}

View File

@ -12,9 +12,7 @@
}, },
{ {
"foreground": "#06884b", "foreground": "#06884b",
"foreground_templates": [ "foreground_templates": ["{{ if gt .Code 0 }}#e61010{{ end }}"],
"{{ if gt .Code 0 }}#e61010{{ end }}"
],
"properties": { "properties": {
"always_enabled": true "always_enabled": true
}, },
@ -96,11 +94,26 @@
"type": "path" "type": "path"
}, },
{ {
"foreground": "#193549", "type": "git",
"powerline_symbol": "\ue0b0",
"style": "powerline", "style": "powerline",
"template": " {{ .Status }} ", "powerline_symbol": "",
"type": "poshgit" "foreground": "#193549",
"background": "#ffeb3b",
"background_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}#FFEB3B{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#FFCC80{{ end }}",
"{{ if gt .Ahead 0 }}#B388FF{{ end }}",
"{{ if gt .Behind 0 }}#B388FB{{ end }}"
],
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}  {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}  {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }}  {{ .StashCount }}{{ end }}",
"properties": {
"fetch_status": true,
"fetch_stash_count": true,
"fetch_upstream_icon": true,
"untracked_modes": {
"/Users/user/Projects/oh-my-posh/": "no"
}
}
} }
], ],
"type": "prompt" "type": "prompt"