bergmeister / lazy-posh-git

Proxy command around Set-Location and its aliases to defer import of posh-git until one is in the root of a git directory
MIT License
12 stars 3 forks source link

Just doesn't work #6

Open futuremotiondev opened 1 year ago

futuremotiondev commented 1 year ago

I'm on Pwsh v7.3.7


  1. Installed as such: Install-Module -Name 'lazy-posh-git' -AllowClobber
  2. Added this to my profile: Import-Module 'lazy-posh-git -ArgumentList 'C:\Users\[username]\Documents\PowerShell\gitprompt.ps1'
  3. Used PSProfiler to measure my profile load time (Measure-Script):

pwsh_PVnFNQi2vg

You can see that posh-git is still loading at launch. If I comment out posh-git entirely, nothing works and I get no prompt in git repositories.

Am I doing things incorrectly?

bergmeister commented 10 months ago

Hi @fmotion1 . Sorry for the late reply. When you say it doesn't work, please be aware, you are not expected to get git tab completion UNTIL your working directory is in a git repo's root (this is where .git folder is). That is the point of the module to defer import of posh-git (which takes time) up until the point when one actually is inside a git directory. Can you confirm whether you can get it working with this please?