Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Parse the original prompt for cwd and env names #1070
clink.get_cwd() is returning a string which is differently encoded than what
Also parse out a environment name set by systems like virtualenv or conda: this
C:\Users\jschulz λ activate py35 C:\Users\jschulz (py35) λ cd c:\temp\ü\(hallo)\ c:\temp\ü\(hallo) (py35) λ
A "better" solution would be proper unicode support in clink: mridgers/clink#415
clink.get_cwd() is returning a string which is differently encoded than what clink.prompt.value expects. This results in garbled path names if the path condains non-ASCII chars. The (arguable hacky) solution is to parse the old prompt for the current directory (which breaks if the user sets a PROMPT env var which is incompatible to the regex used here...). Also parse out a environment name set by systems like virtualenv or conda: this could be done more specifically by targeting each such system and using the usually set environment variable but this would mean that we would have to do that for each and every such system out there and that is probably not a sane idea...