Closed puya-ms closed 2 years ago
Are you using the posh-git prompt? What does $GitStatus
show in a repo with modified files?
Are you using the posh-git prompt
@dahlbyk Thank you so issue was that I had my own global:prompt
function in the $profile
file. However I see that the prompt now only cycles through files that were modified when I entered the git repo directory. Is this a bug?
1- Enter repo directory, say I have file1 and file2 modified
2- git add
Also is there a way to configure the prompt to show parentdir\currentdir only
However I see that the prompt now only cycles through files that were modified when I entered the git repo directory. Is this a bug?
I suppose you could consider it a bug, but this is how it's always worked. Tab expansion uses the cached $GitStatus
to show results faster on tab. If you hit Enter to get a new prompt, you'll get an updated tab expansion list, too.
Also is there a way to configure the prompt to show parentdir\currentdir only
You can set DefaultPromptPath
to any string you want the path to expand, e.g. you could define a Get-ParentAndCurrentPath
function and set $GitPromptSettings.DefaultPromptPath = '$(Get-ParentAndCurrentPath)'
.
Default is the provided Get-PromptPath
:
https://github.com/dahlbyk/posh-git/blob/5a87e8a196d13395f978d774f80dedb40d43b85e/src/PoshGitTypes.ps1#L283
Which is actually pretty complicated: https://github.com/dahlbyk/posh-git/blob/396d726b69ceff6897897987249593e2034885e3/src/Utils.ps1#L393-L429
@dahlbyk Awesome thank you so much!
System Details
Issue Description
This may not be related to posh-git but I am hoping someone here may be able to help. When I do:
The completion cycles through ALL files in current directory and not just the directory / subdirectories of modified files.
I was wondering if anyone had a similar issue and if so how did they resolve it.