Comments (7)
Interesting. Is something else in your $PROFILE
providing a custom prompt
? posh-git won't override if prompt
has changed from the default:
Lines 140 to 144 in 4b746d6
Does Get-Item Function:\prompt | Select -Exp Definition
match the posh-git prompt that starts here?
Lines 33 to 35 in 4b746d6
from posh-git.
My $PROFILE file is empty.
Get-Item Function:\prompt | Select -Exp Definition
Returns the following...
$realLASTEXITCODE = $LASTEXITCODE
$host.UI.RawUI.WindowTitle = Microsoft.PowerShell.Management\Split-Path $pwd.ProviderPath -Leaf
PrePrompt | Microsoft.PowerShell.Utility\Write-Host -NoNewline
CmderPrompt
PostPrompt | Microsoft.PowerShell.Utility\Write-Host -NoNewline
$global:LASTEXITCODE = $realLASTEXITCODE
return " "
This is identical to what it returns on another machine where the prompt works.
Thanks,
Steve.
from posh-git.
If $PROFILE
is empty, is posh-git loading from one of the other profile locations?
$PROFILE.AllUsersAllHosts
$PROFILE.AllUsersCurrentHost
$PROFILE.CurrentUserAllHosts
$PROFILE.CurrentUserCurrentHost
from posh-git.
Hi,
Sorry, but they are all empty. Here is the script Cmder runs on startup if it helps...
https://gist.github.com/stevehjohn/a3d59cd0393f976b3e5c89c1a2f67777
Thanks,
Steve.
from posh-git.
And this same Cmder script has the expected behavior on other systems? I would expect this to be a problem everywhere: https://gist.github.com/stevehjohn/a3d59cd0393f976b3e5c89c1a2f67777#file-profile-ps1-L178-L182. Importing posh-git after a custom prompt
exists will skip overwriting it. You can override that on import, or just import posh-git first. The Cmder script has a similar check to avoid overwriting a custom prompt
.
Do you have a user_profile.ps1
or config\profile.d\*.ps1
on any of these systems?
from posh-git.
Hey,
Yep all appears to be the same. I really don't know why one works and the other doesn't.
I don't want to waste too much of your time. I'll keep chipping away at it and see if I can get it working.
Feel free to close this issue, or leave it open if you'd like me to update with a solution if/when I find one.
Thanks,
Steve.
from posh-git.
You might try asking the Cmder folks? I know they've put effort into making it Just Work, so they may have ideas. Sorry!
from posh-git.
Related Issues (20)
- git ls-remote won't prompt
- Posh Git Module Gets Blocked by Windows Action Guard HOT 7
- Intellisense works on commands that don't exist
- Error when pushing to Bitbucket server HOT 2
- posh-git doesn't work with vscode integrated terminal HOT 5
- posh-git: The term 'posh-git' is not recognized as a name of a cmdlet, function, script file, or executable program. HOT 1
- Calling git on module import could be avoided HOT 2
- Tests break when run under the pwsh 7.3
- Importing posh-git shows empty prompt
- Request: Add -NoANSI option to all Write-commands
- Install fails while retrieving member "TryParse" as it violates the constraint of type 'T1' HOT 3
- posh-git is slow when navigating inside a Git LFS-enabled repository containing multiple gigabyte-sized files.
- $GitPromptSettings.UntrackedFilesMode="Defaul" doesn't respect git config for untracked files
- Tab completion using powershell-git-aliases HOT 1
- Support parameters for GIT command (without any mode), e.g. git -P ...
- No space added after auto-completion when using posh-git
- Integrated powershell in VSC shows unaccuarte state of git.
- Tab auto completion stopped working HOT 1
- Posh-git Prompt will not show HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from posh-git.