JanDeDobbeleer / oh-my-posh

The most customisable and low-latency cross platform/shell prompt renderer
https://ohmyposh.dev
MIT License
17.37k stars 2.39k forks source link

Disables doskey from working #2651

Closed sandem45 closed 2 years ago

sandem45 commented 2 years ago

Code of Conduct

What happened?

I am using windows terminal, and have oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\takuya.omp.json" | Invoke-Expression in my $profile, and I noticed this for some reason disables doskey, or in a other way makes it not work. If I remove --config ... doskey works just fine.

Theme

takuya

What OS are you seeing the problem on?

Windows

Which shell are you using?

powershell

Log output

Version: 8.13.1

Segments:

ConsoleTitle(false) -   0 ms -
shell(true)  -   0 ms - ╭─ powershell
root(false)  -   0 ms -
path(true)   -   0 ms -  ~\AppData\Local\Programs\oh-my-posh\themes
git(false)   -   7 ms -
node(false)  -   1 ms -
time(true)   -   0 ms -    23:34:33 
text(true)   -   0 ms - ╰─
exit(true)   -   1 ms - ❯

Run duration: 34.5275ms

Cache path: C:\Users\sante\AppData\Local\oh-my-posh

Config path: C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes\takuya.omp.json

Logs:

2022/08/11 23:34:33 debug: Getenv
C:\Users\sante\AppData\Local
2022/08/11 23:34:33 Getenv duration: 0s, args: LOCALAPPDATA
2022/08/11 23:34:33 CachePath duration: 494.1µs, args:
2022/08/11 23:34:33 debug: Getenv
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes\takuya.omp.json
2022/08/11 23:34:33 Getenv duration: 0s, args: POSH_THEME
2022/08/11 23:34:33 Shell duration: 12.0036ms, args:
2022/08/11 23:34:33 resolveConfigPath duration: 12.0036ms, args:
2022/08/11 23:34:33 Init duration: 17.4975ms, args:
2022/08/11 23:34:33 Flags duration: 0s, args:
2022/08/11 23:34:33 config.loadConfig duration: 4.668ms, args:
2022/08/11 23:34:33 Flags duration: 0s, args:
2022/08/11 23:34:33 debug: Getenv

2022/08/11 23:34:33 Getenv duration: 0s, args: OMP_CACHE_DISABLED
2022/08/11 23:34:33 WindowsRegistryKeyValue duration: 0s, args: HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 debug: WindowsRegistryKeyValue
ColorizationColor(DWORD): 0xC44C4A48
2022/08/11 23:34:33 Root duration: 0s, args:
2022/08/11 23:34:33 Shell duration: 0s, args:
2022/08/11 23:34:33 ErrorCode duration: 0s, args:
2022/08/11 23:34:33 IsWsl duration: 0s, args:
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 debug: Home
C:\Users\sante
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 debug: User
sante
2022/08/11 23:34:33 User duration: 0s, args:
2022/08/11 23:34:33 debug: Host
DESKTOP-NIPDTNM
2022/08/11 23:34:33 Host duration: 0s, args:
2022/08/11 23:34:33 GOOS duration: 0s, args:
2022/08/11 23:34:33 TemplateCache duration: 0s, args:
2022/08/11 23:34:33 Flags duration: 0s, args:
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 debug: Home
C:\Users\sante
2022/08/11 23:34:33 GOOS duration: 0s, args:
2022/08/11 23:34:33 Shell duration: 0s, args:
2022/08/11 23:34:33 Flags duration: 0s, args:
2022/08/11 23:34:33 TemplateCache duration: 0s, args:
2022/08/11 23:34:33 TemplateCache duration: 0s, args:
2022/08/11 23:34:33 Shell duration: 0s, args:
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 debug: Home
C:\Users\sante
2022/08/11 23:34:33 GOOS duration: 0s, args:
2022/08/11 23:34:33 Root duration: 0s, args:
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 debug: Home
C:\Users\sante
2022/08/11 23:34:33 GOOS duration: 0s, args:
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 Flags duration: 0s, args:
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 debug: Home
C:\Users\sante
2022/08/11 23:34:33 GOOS duration: 0s, args:
2022/08/11 23:34:33 GOOS duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 GOOS duration: 0s, args:
2022/08/11 23:34:33 IsWsl duration: 0s, args:
2022/08/11 23:34:33 StackCount duration: 0s, args:
2022/08/11 23:34:33 DirIsWritable duration: 0s, args:
2022/08/11 23:34:33 TemplateCache duration: 0s, args:
2022/08/11 23:34:33 TemplateCache duration: 0s, args:
2022/08/11 23:34:33 Shell duration: 0s, args:
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 debug: Home
C:\Users\sante
2022/08/11 23:34:33 GOOS duration: 0s, args:
2022/08/11 23:34:33 GOOS duration: 0s, args:
2022/08/11 23:34:33 HasCommand duration: 6.5029ms, args: git.exe
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 error: HasParentFilePath
CreateFile C:\.git: The system cannot find the file specified.
2022/08/11 23:34:33 HasParentFilePath duration: 500.2µs, args: .git
2022/08/11 23:34:33 Flags duration: 0s, args:
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 debug: Home
C:\Users\sante
2022/08/11 23:34:33 GOOS duration: 0s, args:
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 debug: Home
C:\Users\sante
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 debug: HasFiles
false
2022/08/11 23:34:33 HasFiles duration: 0s, args: yarn.lock
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 debug: HasFiles
false
2022/08/11 23:34:33 HasFiles duration: 0s, args: package-lock.json
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 debug: HasFiles
false
2022/08/11 23:34:33 HasFiles duration: 0s, args: package.json
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 debug: HasFiles
false
2022/08/11 23:34:33 HasFiles duration: 500.5µs, args: *.js
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 debug: HasFiles
false
2022/08/11 23:34:33 HasFiles duration: 0s, args: *.ts
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 debug: HasFiles
false
2022/08/11 23:34:33 HasFiles duration: 0s, args: package.json
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 debug: HasFiles
false
2022/08/11 23:34:33 HasFiles duration: 499.7µs, args: .nvmrc
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 debug: HasFiles
false
2022/08/11 23:34:33 HasFiles duration: 0s, args: pnpm-workspace.yaml
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 debug: HasFiles
false
2022/08/11 23:34:33 HasFiles duration: 0s, args: .pnpmfile.cjs
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 debug: HasFiles
false
2022/08/11 23:34:33 HasFiles duration: 0s, args: .npmrc
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 PathSeparator duration: 0s, args:
2022/08/11 23:34:33 debug: HasFiles
false
2022/08/11 23:34:33 HasFiles duration: 0s, args: .vue
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 debug: Home
C:\Users\sante
2022/08/11 23:34:33 GOOS duration: 0s, args:
2022/08/11 23:34:33 TemplateCache duration: 0s, args:
2022/08/11 23:34:33 TemplateCache duration: 0s, args:
2022/08/11 23:34:33 Shell duration: 0s, args:
2022/08/11 23:34:33 Flags duration: 0s, args:
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 debug: Home
C:\Users\sante
2022/08/11 23:34:33 GOOS duration: 0s, args:
2022/08/11 23:34:33 TemplateCache duration: 0s, args:
2022/08/11 23:34:33 TemplateCache duration: 0s, args:
2022/08/11 23:34:33 Shell duration: 0s, args:
2022/08/11 23:34:33 debug: Pwd
C:\Users\sante\AppData\Local\Programs\oh-my-posh\themes
2022/08/11 23:34:33 Pwd duration: 0s, args:
2022/08/11 23:34:33 debug: Home
C:\Users\sante
2022/08/11 23:34:33 GOOS duration: 0s, args:
2022/08/11 23:34:33 ErrorCode duration: 0s, args:
2022/08/11 23:34:33 TemplateCache duration: 0s, args:
2022/08/11 23:34:33 TemplateCache duration: 0s, args:
2022/08/11 23:34:33 Shell duration: 0s, args:
2022/08/11 23:34:33 TemplateCache duration: 0s, args:
2022/08/11 23:34:33 debug: Getenv
C:\Users\sante\AppData\Local
2022/08/11 23:34:33 Getenv duration: 0s, args: LOCALAPPDATA
2022/08/11 23:34:33 CachePath duration: 0s, args:
2022/08/11 23:34:33 Flags duration: 0s, args:
JanDeDobbeleer commented 2 years ago

@sandem45 what is doskey? why would you want doskey to work on PowerShell? For that theme, all we do is print a line, not override anything. And PowerShell history works so I have no clue why that ancient tool doesn't work. I suggest to move to PSReadline.

JanDeDobbeleer commented 2 years ago

@sandem45 I found a lot of posts/issues on the web stating the incompatibility with doskey and PSReadline. Therefore I'm closing this as we can't fix what we can't control. We rely on PSReadline and chances are that calling into it ruines the doskey hack (because after all, it's never designed to work with PowerShell).

github-actions[bot] commented 10 months ago

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.