diff --git a/.config/powershell/profile.ps1 b/.config/powershell/profile.ps1 index a35cf7a..0f58507 100644 --- a/.config/powershell/profile.ps1 +++ b/.config/powershell/profile.ps1 @@ -1,6 +1,31 @@ -function Prompt +function Git-Status +{ + "$([char]27)[31m" + if ((git status --porcelain -b 2>$1 | Select-String -Pattern 'M ') -notmatch 'fatal') { + "M" + } + if ((git status --porcelain -b 2>$1 | Select-String -Pattern '\? ') -notmatch 'fatal') { + "?" + } +} +function Git-Branch +{ + " $([char]27)[35m " + (git branch --show-current) +} +function end_of_prompt { " -$([char]27)[34;1m" + $env:COMPUTERNAME + "" + (Get-Location) + " $([char]27)[32;1m$> $([char]27)[0m" } +function prompt +{ + if ((git log -n 1 2>$1) -notmatch 'fatal') { + " +$([char]27)[34;1m" + $env:COMPUTERNAME + "" + (Get-Location) + (Git-Branch) + (Git-Status) + (end_of_prompt) + } + else + { + " +$([char]27)[34;1m" + $env:COMPUTERNAME + "" + (Get-Location) + (end_of_prompt) + } +} diff --git a/.config/vim/vim_plug b/.config/vim/vim_plug index 10e740e..f9210bd 100644 --- a/.config/vim/vim_plug +++ b/.config/vim/vim_plug @@ -10,6 +10,7 @@ let $vimplug_bundle='~/.local/share/vim/bundle' " ----- List of used plugins call plug#begin($vimplug_bundle) +Plug 'PProvost/vim-ps1' Plug 'deoplete-plugins/deoplete-jedi' Plug 'kovetskiy/sxhkd-vim' Plug 'lervag/vimtex'