-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parsing decodeURI #2013
Parsing decodeURI #2013
Conversation
Don't be uris allow characters will be encoded,hence the %% case. The encoded string is parsed through the decodeURI function
Can you explain in more detail which problem you are fixing? |
First cmder is really easy to use, so I used it on vscode.
Because Chinese is encoded after %% of the situation, and then in the string replacement may be judged as an escape code resulting in an error.
The program did not report an error, but the output text is as follows. I have a little obsessive-compulsive disorder, I don't think it is very good. I found that because Chinese is encoded, can I transcode it? So I google it again. Get this plan. After that, every time I upgrade the cmder, I need to change the change to the new version of the lua script compared to the previous lua script. I hope to help you a little. Finally, cmder is really easy to use, ^_^ |
Can someone that uses SVN confirm this does not break anything? |
Merging this would make the prompt show inaccurate path names, for example if a path name is literally "My%20Home" (as was recently mentioned in #2859) then it would be displayed as "My Home" which is inaccurate (typing Svn should only convert Unicode URIs into URI-escaped strings (e.g. "https://some.where/over%20there"). It should not convert Unicode path names into URI-escaped strings. URIs and path names do not have the same escaping rules. If svn is performing that conversion automatically when writing output, then that seems like a bug or a misconfiguration. If someone manually converted Unicode path names in the file system to use URI escaping rules so that the path names in the file system have "%XX" sequences in them, then Cmder prompt should not translate those -- that would be misleading. It would be reasonable for a user or a team to make a custom prompt filter that performs such translations, but it shouldn't be the default all users. Also, the |
Closing this, as @chrisant996 Can you please write a short and working prompt filter that would call If it's too much trouble, I'd also appreciate a very short guide or writeup, or even pointing to the relevant section of the documentation for Clink. Thanks! |
Cmder already includes the scripts from clink-completions under Clink docs have quite a lot of content about writing prompt filters, and the section Customizing the Prompt is a good place to start. I don't think decodeURI is a good example to create, as it's only applicable to maybe a handful of people who have done very unusual (and problematic!) manual encoding of paths in svn, seemingly to work around not knowing how to configure svn properly. The git_prompt.lua example is much better and much more widely applicable. |
Don't be uris allow characters will be encoded,hence the %% case.
The encoded string is parsed through the decodeURI function