JanDeDobbeleer / oh-my-posh

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

Console Title for Clink/CMD #4160

Closed saumyajyoti closed 1 year ago

saumyajyoti commented 1 year ago

Code of Conduct

What happened?

A bug happened! For Cmder/Clink based prompt. The Console title template does not tale effect. The Title does not change but it appends title text to prompt text:

Theme

Using My Custom theme with below Title template. "console_title_template": "{{.UserName}}@{{.HostName}} πŸ“‚{{ .PWD }}",

What OS are you seeing the problem on?

Windows

Which shell are you using?

cmd

Log output

The Title does not change but it appends below text to prompt text:

πŸ“‚~

log:

[TRACE] 21:14:04.569 shell.go:GOOS() - 0s
[DEBUG] 21:14:04.569 shell.go:Pwd:419 β†’ C:\Users\smukhe5
[TRACE] 21:14:04.569 shell.go:Pwd() - 175.4Β΅s
[DEBUG] 21:14:04.570 shell_windows.go:56 β†’ C:\Users\smukhe5
[TRACE] 21:14:04.570 shell.go:GOOS() - 0s
[TRACE] 21:14:04.570 shell.go:GOOS() - 0s
[TRACE] 21:14:04.570 shell.go:GOOS() - 0s
[TRACE] 21:14:04.570 shell.go:GOOS() - 0s
[TRACE] 21:14:04.570 shell.go:GOOS() - 0s
[TRACE] 21:14:04.570 shell.go:GOOS() - 0s
[TRACE] 21:14:04.570 shell.go:GOOS() - 0s
[TRACE] 21:14:04.570 shell.go:GOOS() - 0s
[TRACE] 21:14:04.570 shell.go:GOOS() - 0s
[TRACE] 21:14:04.570 shell.go:GOOS() - 0s
[DEBUG] 21:14:04.570 shell.go:User:540 β†’ smukhe5
[TRACE] 21:14:04.570 shell.go:User() - 0s
[DEBUG] 21:14:04.570 shell.go:Host:552 β†’ smukhe5-desk
[TRACE] 21:14:04.570 shell.go:Host() - 0s
[TRACE] 21:14:04.570 shell.go:GOOS() - 0s
[DEBUG] 21:14:04.570 shell.go:Getenv:389 β†’ NO DATA
[TRACE] 21:14:04.570 shell.go:Getenv(SHLVL) - 0s
[TRACE] 21:14:04.570 shell.go:TemplateCache() - 2.5827ms
[DEBUG] 21:14:04.570 shell.go:Getenv:389 β†’ 4
[TRACE] 21:14:04.570 shell.go:Getenv(POSH_CURSOR_LINE) - 0s
[DEBUG] 21:14:04.570 shell.go:Getenv:389 β†’ NO DATA
[TRACE] 21:14:04.570 shell.go:Getenv(POSH_CURSOR_COLUMN) - 0s
[TRACE] 21:14:04.570 shell.go:Flags() - 0s
[TRACE] 21:14:04.570 shell.go:Flags() - 0s
[TRACE] 21:14:04.570 shell.go:Shell() - 0s
[TRACE] 21:14:04.571 shell.go:Flags() - 0s
[TRACE] 21:14:04.571 shell.go:Flags() - 0s
[TRACE] 21:14:04.571 shell.go:Pwd() - 0s
[DEBUG] 21:14:04.571 shell_windows.go:56 β†’ C:\Users\smukhe5
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[DEBUG] 21:14:04.571 segment.go:SetEnabled:494 β†’ Segment: Executiontime
[TRACE] 21:14:04.571 shell.go:Pwd() - 0s
[TRACE] 21:14:04.571 shell.go:Flags() - 0s
[DEBUG] 21:14:04.571 properties.go:GetBool:22 β†’ always_enabled: true
[TRACE] 21:14:04.571 shell.go:ExecutionTime() - 0s
[DEBUG] 21:14:04.571 shell_windows.go:56 β†’ C:\Users\smukhe5
[DEBUG] 21:14:04.571 properties.go:GetFloat64:34 β†’ threshold: 500.000000
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[DEBUG] 21:14:04.571 properties.go:GetString:28 β†’ austin
[TRACE] 21:14:04.571 shell.go:TemplateCache() - 0s
[DEBUG] 21:14:04.571 segment.go:SetEnabled:494 β†’ Segment: Git
[TRACE] 21:14:04.571 shell.go:Flags() - 0s
[TRACE] 21:14:04.571 shell.go:Pwd() - 0s
[DEBUG] 21:14:04.571 properties.go:GetString:28 β†’ files
[DEBUG] 21:14:04.571 shell_windows.go:56 β†’ C:\Users\smukhe5
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[DEBUG] 21:14:04.571 segment.go:SetEnabled:494 β†’ Segment: Root
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell.go:Pwd() - 0s
[DEBUG] 21:14:04.571 shell_windows.go:56 β†’ C:\Users\smukhe5
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell_windows.go:Root() - 0s
[DEBUG] 21:14:04.571 segment.go:SetEnabled:494 β†’ Segment: Python
[TRACE] 21:14:04.571 shell.go:Flags() - 0s
[TRACE] 21:14:04.571 shell.go:Pwd() - 0s
[DEBUG] 21:14:04.571 shell_windows.go:56 β†’ C:\Users\smukhe5
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[DEBUG] 21:14:04.571 segment.go:SetEnabled:494 β†’ Segment: Session
[DEBUG] 21:14:04.571 properties.go:GetStringArray:52 β†’ extensions: [*.py *.ipynb pyproject.toml venv.bak]
[DEBUG] 21:14:04.571 shell.go:Getenv:389 β†’ NO DATA
[TRACE] 21:14:04.571 shell.go:Getenv(SSH_CONNECTION) - 0s
[DEBUG] 21:14:04.571 shell.go:Getenv:389 β†’ NO DATA
[DEBUG] 21:14:04.571 properties.go:GetStringArray:52 β†’ folders: [.venv venv virtualenv env venv-win pyenv-win]
[TRACE] 21:14:04.571 shell.go:TemplateCache() - 0s
[TRACE] 21:14:04.571 shell.go:Flags() - 0s
[DEBUG] 21:14:04.571 properties.go:GetBool:22 β†’ home_enabled: false
[TRACE] 21:14:04.571 shell.go:Pwd() - 0s
[DEBUG] 21:14:04.571 shell_windows.go:56 β†’ C:\Users\smukhe5
[TRACE] 21:14:04.571 shell.go:Pwd() - 0s
[TRACE] 21:14:04.571 shell.go:Flags() - 0s
[DEBUG] 21:14:04.571 shell_windows.go:56 β†’ C:\Users\smukhe5
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[DEBUG] 21:14:04.571 segment.go:SetEnabled:494 β†’ Segment: Node
[TRACE] 21:14:04.571 shell.go:Pwd() - 0s
[DEBUG] 21:14:04.571 properties.go:GetStringArray:52 β†’ extensions: [*.js *.ts package.json .nvmrc pnpm-workspace.yaml .pnpmfile.cjs .npmrc .vue]
[DEBUG] 21:14:04.571 properties.go:GetStringArray:52 β†’ folders: []
[DEBUG] 21:14:04.571 properties.go:GetBool:22 β†’ home_enabled: false
[TRACE] 21:14:04.571 shell.go:Pwd() - 0s
[DEBUG] 21:14:04.571 shell_windows.go:56 β†’ C:\Users\smukhe5
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[DEBUG] 21:14:04.571 segment.go:SetEnabled:494 β†’ Segment: Path
[TRACE] 21:14:04.571 shell.go:Pwd() - 0s
[TRACE] 21:14:04.571 shell.go:Shell() - 0s
[TRACE] 21:14:04.571 shell.go:Shell() - 0s
[DEBUG] 21:14:04.571 properties.go:GetBool:22 β†’ mapped_locations_enabled: true
[DEBUG] 21:14:04.571 properties.go:GetString:28 β†’ 
[DEBUG] 21:14:04.571 properties.go:GetString:28 β†’ 
[DEBUG] 21:14:04.571 shell_windows.go:56 β†’ C:\Users\smukhe5
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[DEBUG] 21:14:04.571 properties.go:GetString:28 β†’ 🏠
[DEBUG] 21:14:04.571 properties.go:GetKeyValueMap:46 β†’ mapped_locations: map[D:/SOURCE/github/*:ξ—½ β…ˆ]
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell.go:PathSeparator() - 0s
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell.go:PathSeparator() - 0s
[TRACE] 21:14:04.571 shell.go:PathSeparator() - 0s
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell.go:PathSeparator() - 0s
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell.go:PathSeparator() - 0s
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell.go:PathSeparator() - 0s
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell.go:GOOS() - 0s
[TRACE] 21:14:04.571 shell.go:PathSeparator() - 0s
[TRACE] 21:14:04.571 shell.go:Pwd() - 0s
[TRACE] 21:14:04.571 shell_windows.go:IsWsl() - 0s
[TRACE] 21:14:04.571 shell.go:StackCount() - 0s
[DEBUG] 21:14:04.575 win32_windows.go:isWriteable:299 β†’ not current user or in group
[DEBUG] 21:14:04.575 win32_windows.go:isWriteable:303 β†’ current user is member of S-1-5-32-544
[DEBUG] 21:14:04.575 win32_windows.go:isWriteable:311 ↓
    WRITE_DAC
    WRITE_OWNER
    SYNCHRONIZE
    DELETE
    READ_CONTROL
[DEBUG] 21:14:04.575 win32_windows.go:isWriteable:313 β†’ user has write access
[TRACE] 21:14:04.575 shell_windows.go:DirIsWritable() - 4.0084ms
[TRACE] 21:14:04.575 shell.go:TemplateCache() - 0s
[DEBUG] 21:14:04.595 shell.go:CommandPath:591 β†’ C:\Program Files\Git\cmd\git.exe
[TRACE] 21:14:04.595 shell.go:CommandPath(git.exe) - 24.7086ms
[TRACE] 21:14:04.595 shell.go:HasCommand(git.exe) - 24.7086ms
[TRACE] 21:14:04.595 shell.go:Pwd() - 0s
[ERROR] 21:14:04.596 shell.go:HasParentFilePath:725 β†’ CreateFile .git: The system cannot find the file specified.
[TRACE] 21:14:04.596 shell.go:HasParentFilePath(.git) - 995.9Β΅s
[DEBUG] 21:14:04.596 properties.go:GetBool:22 β†’ fetch_bare_info: false
[TRACE] 21:14:04.598 shell.go:TemplateCache() - 0s
[TRACE] 21:14:04.598 shell.go:TemplateCache() - 0s
[TRACE] 21:14:04.598 shell.go:Shell() - 0s
[TRACE] 21:14:04.598 shell.go:Shell() - 0s
[TRACE] 21:14:04.598 shell.go:TemplateCache() - 0s
[TRACE] 21:14:04.598 shell.go:Shell() - 0s
[TRACE] 21:14:04.598 shell.go:Shell() - 0s
[TRACE] 21:14:04.598 shell.go:Shell() - 0s
[TRACE] 21:14:04.598 shell.go:Shell() - 0s
[TRACE] 21:14:04.598 shell.go:Flags() - 0s
[TRACE] 21:14:04.598 shell.go:Pwd() - 0s
[DEBUG] 21:14:04.598 shell_windows.go:56 β†’ C:\Users\smukhe5
[TRACE] 21:14:04.598 shell.go:GOOS() - 0s
[DEBUG] 21:14:04.598 segment.go:SetEnabled:494 β†’ Segment: Time
[DEBUG] 21:14:04.598 properties.go:GetString:28 β†’ 15:04:05
[TRACE] 21:14:04.598 shell.go:TemplateCache() - 0s
[TRACE] 21:14:04.601 shell.go:TemplateCache() - 0s
[TRACE] 21:14:04.601 shell.go:Shell() - 0s
[DEBUG] 21:14:04.602 shell_windows.go:TerminalWidth:109 β†’ terminal width: 230
[TRACE] 21:14:04.602 shell_windows.go:TerminalWidth() - 989.8Β΅s
[TRACE] 21:14:04.602 shell.go:Shell() - 0s
[TRACE] 21:14:04.602 shell.go:Shell() - 0s
[TRACE] 21:14:04.602 shell.go:Shell() - 0s
[TRACE] 21:14:04.602 shell.go:Flags() - 0s
[DEBUG] 21:14:04.602 properties.go:GetString:28 β†’ {{ .Code }}
[TRACE] 21:14:04.602 shell.go:Pwd() - 0s
[DEBUG] 21:14:04.602 shell_windows.go:56 β†’ C:\Users\smukhe5
[TRACE] 21:14:04.602 shell.go:GOOS() - 0s
[DEBUG] 21:14:04.602 segment.go:SetEnabled:494 β†’ Segment: Exit
[TRACE] 21:14:04.602 shell.go:StatusCodes() - 0s
[TRACE] 21:14:04.602 shell.go:Flags() - 0s
[TRACE] 21:14:04.602 shell.go:Pwd() - 0s
[DEBUG] 21:14:04.602 shell_windows.go:56 β†’ C:\Users\smukhe5
[TRACE] 21:14:04.602 shell.go:GOOS() - 0s
[DEBUG] 21:14:04.602 segment.go:SetEnabled:494 β†’ Segment: Shell
[DEBUG] 21:14:04.602 properties.go:GetKeyValueMap:46 β†’ mapped_shell_names: map[]
[TRACE] 21:14:04.602 shell.go:Shell() - 0s
[TRACE] 21:14:04.602 shell.go:Flags() - 0s
[TRACE] 21:14:04.602 shell.go:TemplateCache() - 0s
[TRACE] 21:14:04.602 shell.go:TemplateCache() - 0s
[DEBUG] 21:14:04.602 properties.go:GetBool:22 β†’ always_enabled: true
[TRACE] 21:14:04.602 shell.go:TemplateCache() - 0s
[TRACE] 21:14:04.603 shell.go:Shell() - 0s
[TRACE] 21:14:04.603 shell.go:TemplateCache() - 0s
[TRACE] 21:14:04.603 shell.go:Shell() - 0s
[DEBUG] 21:14:04.603 shell.go:Getenv:389 β†’ NO DATA
[TRACE] 21:14:04.603 shell.go:Getenv(TERM_PROGRAM) - 0s
[TRACE] 21:14:04.603 shell.go:TemplateCache() - 0s
[TRACE] 21:14:04.603 shell.go:Shell() - 0s
[TRACE] 21:14:04.603 shell.go:Shell() - 0s
[TRACE] 21:14:04.603 shell.go:Flags() - 0s
[TRACE] 21:14:04.603 shell.go:Shell() - 0s
[TRACE] 21:14:04.603 shell.go:Shell() - 0s
[DEBUG] 21:14:04.603 shell.go:Getenv:389 β†’ C:\Users\smukhe5\AppData\Local
[TRACE] 21:14:04.603 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 21:14:04.603 shell_windows.go:CachePath() - 0s
[TRACE] 21:14:04.603 shell.go:Flags() - 0s
JanDeDobbeleer commented 1 year ago

@saumyajyoti are you using the correct and up to date clink? The debug log should also show that, I think you removed that part.

saumyajyoti commented 1 year ago

Hi @JanDeDobbeleer Yes I am using latest Clink 1.5.2. Adding the initial portion of the log.

ξ‚Άο’‰ cmd ξ‚° ξŠ…ξŠ…πŸ“‚~ oh-my-posh.exe debug --plain

Version: 18.3.3

Shell: cmd (clink v1.5.2.0f063a)

Prompt:

ξ‚ΆπŸ‘€ smukhe5 @ s-deskξ‚°ξ‚°0 πŸ ξ‚°ξ‚°0msξ‚΄ ξ‚Ά23:21:25ξ‚΄ ξ‚Άο’‰ cmd ξ‚° ξŠ…ξŠ…

Segments:

ConsoleTitle(true) - 7 ms Session(true) - 0 ms Path(true) - 5 ms Git(false) - 17 ms Node(false) - 0 ms Python(false) - 0 ms Root(false) - 0 ms Executiontime(true) - 0 ms Time(true) - 0 ms Shell(true) - 0 ms Exit(true) - 0 ms

Run duration: 49.845ms

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

Config path: U:\POSH\saumya-prompt.omp.json

Logs:

[DEBUG] 23:21:25.920 shell.go:Getenv:389 β†’ NO DATA [TRACE] 23:21:25.920 shell.go:Getenv(TERM_PROGRAM) - 512.8Β΅s [DEBUG] 23:21:25.920 shell.go:Getenv:389 β†’ C:\Users\smukhe5\AppData\Local [TRACE] 23:21:25.920 shell.go:Getenv(LOCALAPPDATA) - 0s [TRACE] 23:21:25.920 shell_windows.go:CachePath() - 0s [DEBUG] 23:21:25.921 shell.go:Getenv:389 β†’ U:\POSH\saumya-prompt.omp.json [TRACE] 23:21:25.921 shell.go:Getenv(POSH_THEME) - 0s [DEBUG] 23:21:25.921 shell.go:Shell:629 β†’ no shell name provided in flags, trying to detect it [DEBUG] 23:21:25.934 shell.go:Shell:637 β†’ process name: cmd.exe [TRACE] 23:21:25.934 shell.go:Shell() - 12.3865ms [TRACE] 23:21:25.934 shell.go:resolveConfigPath() - 12.3865ms [TRACE] 23:21:25.934 shell.go:Init() - 14.3417ms [TRACE] 23:21:25.934 shell.go:Flags() - 0s [TRACE] 23:21:25.935 config.go:loadConfig() - 1.4054ms [TRACE] 23:21:25.935 shell.go:Flags() - 0s [DEBUG] 23:21:25.935 shell.go:Getenv:389 β†’ NO DATA [TRACE] 23:21:25.935 shell.go:Getenv(OMP_CACHE_DISABLED) - 0s [TRACE] 23:21:25.935 shell_windows.go:WindowsRegistryKeyValue(HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor) - 0s [TRACE] 23:21:25.935 shell.go:GOOS() - 0s [TRACE] 23:21:25.935 shell.go:GOOS() - 0s [TRACE] 23:21:25.935 shell.go:GOOS() - 0s [TRACE] 23:21:25.935 shell.go:GOOS() - 0s [TRACE] 23:21:25.935 shell.go:GOOS() - 0s [TRACE] 23:21:25.935 shell.go:GOOS() - 0s [TRACE] 23:21:25.935 shell.go:GOOS() - 0s [TRACE] 23:21:25.935 shell.go:GOOS() - 0s [TRACE] 23:21:25.935 shell.go:GOOS() - 0s [TRACE] 23:21:25.935 shell.go:GOOS() - 0s [TRACE] 23:21:25.935 shell.go:GOOS() - 0s [TRACE] 23:21:25.935 shell.go:GOOS() - 0s [TRACE] 23:21:25.935 shell.go:GOOS() - 0s [TRACE] 23:21:25.935 shell.go:GOOS() - 0s [TRACE] 23:21:25.935 shell.go:GOOS() - 0s [TRACE] 23:21:25.935 shell.go:GOOS() - 0s [TRACE] 23:21:25.935 shell.go:GOOS() - 0s [TRACE] 23:21:25.935 shell.go:GOOS() - 0s [TRACE] 23:21:25.935 shell.go:GOOS() - 0s [DEBUG] 23:21:25.936 shell_windows.go:WindowsRegistryKeyValue:215 β†’ ColorizationColor(DWORD): 0xC4459BAC [TRACE] 23:21:25.936 shell.go:Shell() - 0s [DEBUG] 23:21:25.936 shell.go:Getenv:389 β†’ clink v1.5.2.0f063a [TRACE] 23:21:25.936 shell.go:Getenv(POSH_SHELL_VERSION) - 0s [DEBUG] 23:21:25.936 debug.go:PrintDebug:22 β†’ Segment: Title [TRACE] 23:21:25.936 shell_windows.go:Root() - 0s [TRACE] 23:21:25.936 shell.go:Shell() - 0s [TRACE] 23:21:25.936 shell.go:StatusCodes() - 0s [TRACE] 23:21:25.936 shell_windows.go:IsWsl() - 0s [DEBUG] 23:21:25.942 shell.go:TemplateCache:810 β†’ environment: [=C:=C:\Users\smukhe5 =clink.bin=C:\tools\cmdermini\vendor\clink =clink.id=29732 =clink.profile=C:\tools\cmdermini\config =clink.scripts=C:\tools\cmdermini\vendor =ExitCode=00000000 add_path=C:\tools\cmdermini add_to_path=C:\tools\cmdermini aliases=C:\tools\cmdermini\config\user_aliases.cmd ALLUSERSPROFILE=C:\ProgramData APPDATA=C:\Users\smukhe5\AppData\Roaming architecture_bits=64 ccall=call "C:\tools\cmdermini\vendor\bin\cexec.cmd" cexec="C:\tools\cmdermini\vendor\bin\cexec.cmd"

JanDeDobbeleer commented 1 year ago

@saumyajyoti something to check after my holidays in this case. Bit tricky to see the issue on mobile. Can you perhaps also provide a screenshot?

saumyajyoti commented 1 year ago

image Highlighted the extra chars in prompt.

JanDeDobbeleer commented 1 year ago

@saumyajyoti does this also happen in Windows Terminal BTW? Because console title ANSI sequence interpretation is a terminal feature.

saumyajyoti commented 1 year ago

@JanDeDobbeleer , I tested it on Windows terminal Version: 1.17.12191.0, with PWSH and CMD/Clink. and also in Cmder / Conemu UI. Both showed the problem. WIndows terminal with PWSH Shell works fine. cmd/Clink shows the issue.

JanDeDobbeleer commented 1 year ago

@saumyajyoti this seems to be a bug in clink. When you remove the folder icon, it works correctly. Using PowerShell I can use that character for the console title and it shows correctly. Can you create a bug on their end? cc. @chrisant996

saumyajyoti commented 1 year ago

Thanks for the debug and root cause. :) Sure, I'll do.

chrisant996 commented 1 year ago

@saumyajyoti Thanks for reporting this. The fix will be available in the next published release, probably later this week or next week.

If the prompt string contains OSC 2 ; string {EMOJI} BEL then the OSC code is stripped and the string {EMOJI} part shows up in the prompt.

The same problem occurs for any OSC code containing any UTF8 content beyond ASCII characters (not just for emoji).

Commit https://github.com/mridgers/clink/commit/9557d06c8cdf39ad995d8bd18284a71c8c218bec on May 6, 2016 introduced support for OSC codes in the ecma48 parser for escape codes. It mistakenly used CSI code rules for valid characters for OSC codes, as well. It's been that way for over 8 years without being noticed/reported.

saumyajyoti commented 1 year ago

Thanks @chrisant996 for the quick fix.

github-actions[bot] commented 6 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.