Comments (19)
It's actually the Vi mode... u_u
@JanDeDobbeleer thanks for the walkthrough, may I close the issue?
from oh-my-posh.
@mezdelex which scoop install is this? We don't have that one in our docs, the one you need to use is:
scoop install https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/oh-my-posh.json
from oh-my-posh.
@mezdelex which scoop install is this? We don't have that one in our docs, the one you need to use is:
scoop install https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/oh-my-posh.json
the one not rendering the path, git and language server info is the last version scoop install oh-my-posh
. The expected one was after installing a random previous version scoop install oh-my-posh@{theShownVersion}
.
In the first screenshot I'm in the same directory as in the Expected
one (nvim) .
from oh-my-posh.
@mezdelex I know, but that scoop package isn't maintained by me. Can you remove that and install using one of the official means of installation?
from oh-my-posh.
@JanDeDobbeleer
I uninstalled the package with scoop uninstall oh-my-posh
and installed with scoop install https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/oh-my-posh.json
and got the same result.
from oh-my-posh.
@mezdelex this makes no sense at all, even with that scoop version I can't reproduce this. At all. Also, the path segment has no conditional ability, you add it, it's there.
from oh-my-posh.
@mezdelex can you share your full configuration?
from oh-my-posh.
Sure, here's what I'm using
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "#FB4934",
"style": "plain",
"template": " ",
"type": "root"
},
{
"foreground": "#83A598",
"properties": {
"folder_icon": "",
"folder_separator_icon": "",
"home_icon": "",
"style": "mixed"
},
"style": "plain",
"template": "{{ .Path }}",
"type": "path"
},
{
"foreground": "#B8BB26",
"foreground_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}#FABD2F{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#FB4934{{ end }}",
"{{ if gt .Ahead 0 }}#FB4934{{ end }}",
"{{ if gt .Behind 0 }}#FABD2F{{ end }}"
],
"properties": {
"fetch_stash_count": true,
"fetch_status": true,
"fetch_upstream_icon": true,
"github_icon": " "
},
"style": "plain",
"template": " on {{ .UpstreamIcon }}{{ .HEAD }}{{ if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} <#FB4934> {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} <#FABD2F> {{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0 }} {{ .StashCount }}{{ end }}",
"type": "git"
}
],
"type": "prompt"
},
{
"alignment": "right",
"segments": [
{
"foreground": "#D3869B",
"properties": {
"display_mode": "files"
},
"style": "plain",
"template": " Angular[]{{ .Full }}",
"type": "angular"
},
{
"foreground": "#D3869B",
"properties": {
"display_mode": "files"
},
"style": "plain",
"template": " .NET[]{{ .Full }}",
"type": "dotnet"
},
{
"foreground": "#D3869B",
"properties": {
"display_mode": "files"
},
"style": "plain",
"template": " Go[]{{ .Full }}",
"type": "go"
},
{
"foreground": "#D3869B",
"properties": {
"display_mode": "files"
},
"style": "plain",
"template": " Haskell[]{{ .Full }}",
"type": "haskell"
},
{
"foreground": "#D3869B",
"properties": {
"display_mode": "files"
},
"style": "plain",
"template": " Java[]{{ .Full }}",
"type": "java"
},
{
"foreground": "#D3869B",
"properties": {
"display_mode": "files"
},
"style": "plain",
"template": " Kotlin[]{{ .Full }}",
"type": "kotlin"
},
{
"foreground": "#D3869B",
"properties": {
"display_mode": "files"
},
"style": "plain",
"template": " Lua[]{{ .Full }}",
"type": "lua"
},
{
"foreground": "#D3869B",
"properties": {
"display_mode": "files"
},
"style": "plain",
"template": " Node[]{{ .Full }}",
"type": "node"
},
{
"foreground": "#D3869B",
"properties": {
"display_mode": "files"
},
"style": "plain",
"template": " PHP[]{{ .Full }}",
"type": "php"
},
{
"foreground": "#D3869B",
"properties": {
"display_mode": "files"
},
"style": "plain",
"template": " Python[]{{ .Full }}",
"type": "python"
},
{
"foreground": "#D3869B",
"properties": {
"display_mode": "files"
},
"style": "plain",
"template": " React[]{{ .Full }}",
"type": "react"
},
{
"foreground": "#D3869B",
"properties": {
"display_mode": "files"
},
"style": "plain",
"template": " Rust[]{{ .Full }}",
"type": "rust"
},
{
"foreground": "#8EC07C",
"style": "plain",
"template": " RAM[]{{ (div ((sub .PhysicalTotalMemory .PhysicalFreeMemory)) 1000000000) }}/{{ (div .PhysicalTotalMemory 1000000000) }}GB",
"type": "sysinfo"
}
],
"type": "prompt"
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "#FABD2F",
"properties": {
"time_format": "15:04:05"
},
"style": "plain",
"template": "{{ .CurrentDate | date .Format }} ",
"type": "time"
},
{
"foreground": "#FABD2F",
"properties": {
"threshold": 0
},
"style": "plain",
"template": " {{ .FormattedMs }} ",
"type": "executiontime"
},
{
"foreground": "#83A598",
"style": "plain",
"template": "",
"type": "text"
}
],
"type": "prompt"
}
],
"final_space": true,
"version": 2
}
from oh-my-posh.
@mezdelex with your config, using that version of scoop you reported the issue with:
![image](https://private-user-images.githubusercontent.com/2492783/350790760-83283b0b-6195-4711-99b4-69c238fbaa4c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIwMjA2MTIsIm5iZiI6MTcyMjAyMDMxMiwicGF0aCI6Ii8yNDkyNzgzLzM1MDc5MDc2MC04MzI4M2IwYi02MTk1LTQ3MTEtOTliNC02OWMyMzhmYmFhNGMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcyNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MjZUMTg1ODMyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDE5NmVjZjM5MzA1NmQyYjJhZjI4OTEzODg5ZGE1YWY2ZmI1N2QxMzQ4ZWI4ZDJjYWQ5M2M3OWY4NWY0ZjlmMyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.0u45dLPE40RKbbmzgDIgie4gCBBiEwvP5fE479sN5-A)
Can you do me a favour and try the full path when using oh-my-posh init
like I do in my screenshot?
from oh-my-posh.
@JanDeDobbeleer here's the pwsh profile I use:
Import-Module -Name Terminal-Icons
Invoke-Expression (&oh-my-posh init powershell -c ~/.mezdelex.omp.json)
Invoke-Expression (&{(zoxide init powershell | Out-String)})
Set-PSReadLineOption -BellStyle None
Set-PSReadLineOption -EditMode Vi
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineOption -PredictionViewStyle ListView
Set-PSReadLineKeyHandler -Key "ctrl+n" -Function NextHistory
Set-PSReadLineKeyHandler -Key "ctrl+p" -Function PreviousHistory
Set-PsFzfOption -PSReadlineChordProvider "ctrl+f"
Set-PsFzfOption -PSReadlineChordReverseHistory "ctrl+r"
from oh-my-posh.
@mezdelex that's not what I asked, I want to rule out everything as I can't solve it unless I know what's causing this. In the code we have nothing that could do this, so something else is off, and of the two people who reported this, both of you use scoop the same way. If this was a code issue we would see a lot more reports (and I could easily reproduce it as well).
from oh-my-posh.
@mezdelex that's not what I asked, I want to rule out everything as I can't solve it unless I know what's causing this. In the code we have nothing that could do this, so something else is off, and of the two people who reported this, both of you use scoop the same way. If this was a code issue we would see a lot more reports (and I could easily reproduce it as well).
Hm, there's no oh-my-posh.exe in the current directory whatsoever. There's only install.json and manifest.json
from oh-my-posh.
@mezdelex interesting, I want to bet there's something off with scoop here. What does get-command oh-my-posh
say?
from oh-my-posh.
That's it, I've uninstalled oh-my-posh and reinstalled again the 21.26.0 and it generates the .exe file correctly in the scoop apps directory (and themes
directory as well btw).
from oh-my-posh.
@mezdelex when you only keep the oh-my-posh init line in your profile, do you still get the same behavior?
from oh-my-posh.
@mezdelex when you only keep the oh-my-posh init line in your profile, do you still get the same behavior?
Nope, it actually works perfectly when there's only that line in the .ps1 even if the generated files are in that weird path (Programs/oh-my-posh/bin/oh-my-posh.exe)
putting both inits at the end of the ps1 solves the problem and everything works, despite the directory issue.
from oh-my-posh.
@mezdelex Now we're getting somewhere. Something is messing with the $PWD variable (or other path information). Can you re-enable until you find the culprit?
from oh-my-posh.
@mezdelex I'm quite certain zoxide is the one messing with PowerShell internals here.
from oh-my-posh.
If I keep them in the same order but comment Set-PSReadLineOption everything works as well.
from oh-my-posh.
Related Issues (20)
- Access .Ahead and .Behind of the push-remote in the built-in Git segment
- Right align and spacing issues inside neovim terminal HOT 7
- Update on Windows always fails with "access denied" HOT 3
- Right-aligned prompt bugs out when previous output is not newline-terminated HOT 4
- Some Modules are not working after update from Scoop HOT 4
- The conda environment name disappears when windows powershell enters the user's root directory. HOT 3
- Windows Terminal - Powershell slow to load when internet disabled/ network offline
- Enabling Powershell vi mode breaks oh-my-posh HOT 4
- Possible side effect of removal of rpath support? HOT 3
- $ref not working (References, Definitions and Functions) HOT 3
- Path segment always displays "~", regardless of the actual current directory HOT 7
- Entered text can get overwritten while typing when wrapped HOT 5
- Transient prompt stopped working. HOT 2
- Incompatible on fish 3.3 HOT 2
- Adaptative Git Path HOT 4
- ERROR: The system cannot find the HEAD in git worktree HOT 12
- oh-my-posh not working on PWSH 7.4.4 HOT 5
- [pwsh] After upgrading with winget from v22.2.0 to v22.3.0 (still borked with v23.0.1) there is a CONFIG ERROR in the shell HOT 10
- Not working in Bash in TTY
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 oh-my-posh.