randy3k / Terminus

Bring a real terminal to Sublime Text
https://packagecontrol.io/packages/Terminus
MIT License
1.4k stars 81 forks source link

WSL starting directory and extra offset spaces after zsh prompt. #161

Open OpenWaygate opened 5 years ago

OpenWaygate commented 5 years ago

The default WSL starting directory is /mnt/c/User/win_user_name, which is same as it in microsoft terminal.

In microsoft terminal, there is an option "startingDirectory" : "//wsl$/Ubuntu/home/ubuntu_user_name", that make WSL start at ~, so I try these

"cwd": "//wsl$/Ubuntu/home/ubuntu_user_name",
"cwd": "/home/ubuntu_user_name",
"cwd": "~",
"cwd": "C:/Users/win_user_name/AppData/Local/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc/LocalState/rootfs/home/ubuntu_user_name",

neither of which works.

Second problem, I have installed zsh in WSL, when it is opened in ST3, there has extra spaces after each prompt 1

As you can see in this image, all I do is press enter in first line, type l, the s appears due to zsh autoseggestion, but the cursor is not right after l. The extra offset spaces behaves extremely weird.

randy3k commented 5 years ago

I don't know enough about WSL to provide a solution.

For the extra spaces, there may be a bug in rendering the width of an emoji, try changing your prompt to see if it helps.

AmjadHD commented 5 years ago

maybe related #130