Closed hitobashira closed 9 months ago
pane:get_current_working_dir
returns a file URI in which the path component is percent-encoded. You need to decode it before passing it to window:set_right_status
.
@@ -41,7 +41,9 @@
hostname = hostname:sub(1, dot - 1)
end
-- and extract the cwd from the uri
- cwd = cwd_uri:sub(slash)
+ cwd = cwd_uri:sub(slash):gsub("%%(%x%x)", function(hex)
+ return string.char(tonumber(hex, 16))
+ end)
table.insert(cells, cwd)
table.insert(cells, hostname) -- 外してみた。2023年2月20日
0f-0b, wez. Great. thanks.
I've looked into this a bit and my conclusion is:
pane:get_current_working_dir
returns a URI string and the result is conformant with thatIn the meantime, I'm reclassifying this as an enhancement issue to make it simpler to do the things that most people will want to do with that url.
In main
, this method returns a Url object.
Please see the updated example on:
The Url object is documented at https://github.com/wez/wezterm/blob/b904ed7677aae82e185c63113f5d87df6edeef63/docs/config/lua/wezterm.url/Url.md
(those docs will show up on the website within 20-60 minutes)
It typically takes about an hour before commits are available as nightly builds for all platforms. Linux builds are the fastest to build and are often available within about 20 minutes. Windows and macOS builds take a bit longer.
Please take a few moments to try out the changes and let me know how that works out. You can find the nightly downloads for your system in the wezterm installation docs.
If you prefer to use packages provided by your distribution or package manager of choice and don't want to replace that with a nightly download, keep in mind that you can download portable packages (eg: a .dmg
file on macOS, a .zip
file on Windows and an .AppImage
file on Linux) that can be run without permanently installing or replacing an existing package, and can then simply be deleted once you no longer need them.
If you are eager and can build from source then you may be able to try this out more quickly.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
What Operating System(s) are you seeing this problem on?
Linux X11
Which Wayland compositor or X11 Window manager(s) are you using?
OS: Manjaro Linux x86_64 DE: Cinnamon WM: Mutter (Muffin)
WezTerm version
wezterm 20230408-112425-69ae8472
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
No, and I'll explain why below
Describe the bug
valid character display.
It's been the same since I started using Wezterm. Any version. I'm not in any trouble.
However, I would be happy to get a correctly encoded string.
Please let me know if there is any problem with my settings.
It's a low priority for me personally.
thank you.
$ mkdir '日本語文字列(multibytes)' && cd $_ mkdir: ディレクトリ '日本語文字列(multibytes)' を作成しました /tmp/RAMRAM/WORKING/日本語文字列(multibytes) zish 2023-07-15 17:03:20 /tmp/RAMRAM/WORKING/日本語文字列(multibytes)
To Reproduce
No response
Configuration
Expected Behavior
No response
Logs
No response
Anything else?
No response