skywind3000 / z.lua

:zap: A new cd command that helps you navigate faster by learning your habits.
MIT License
2.98k stars 140 forks source link

z cannot save other drive history in windows #201

Closed Jaehaks closed 7 months ago

Jaehaks commented 7 months ago

thank you for your effort.

i am using z in windows 10 and cmd. z works well in c:\ drive. but when i tour in d:\ drive, the history does not save in database

could you fixed it?

skywind3000 commented 7 months ago

Are you using z.lua with clink ? what is your lua version?

Jaehaks commented 7 months ago

@skywind3000 lua : 5.4.2 clink : 1.6.4 z.lua is in the clink folder.

I found that drive location doesn't matter. Directory which has non-english name does not include z.lua database. I tested both 2 PC. First one can insert directory to z.lua databse although it has non-english name , but the other one does not. The difference what i found is, First one open cmd prompt in windows terminal from MS store(v1.18.10301) and the other one's windows terminal is from github (v1.19.240130002) But the problem happend in default cmd prompt.

Do you have shown this problem?


I found that the database (~/.zlua) has all histories of directory even though it has non-english characters. but when i call 'z', directories which has non-english name are not shown.

Jaehaks commented 7 months ago

I found the solution. If codepage of clink is 949, z list could not include non-english directory. I changed it to 65001

Control -> Language settings -> Administrative language settings -> change system locale => check "Beta: User Unicode UTF-8 for world wide language support