skywind3000 / skywind3000/z.lua

Integration with fzf on Windows does not work in some cases.

Open
#215 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
3.1k
Forks
148
PR merge metrics
No merged PRs in 30d

Description

Below is the example of the problem on my Windows 10 x64 with Clink in two screenshots:

Image

Image

Below two pictures explaining the root of the problem.
First is Lua interpreter launched with lua52.dll which was compiled in year 2015 with MinGW (v4.9.3):
Image
Currently z.lua code expects similar result from os.tmpname() function.

Second is the same Lua interpreter launched with lua52.dll which was compiled in year 2022 with MSVC19:
Image
Lua 5.2 interpreter integrated into Clink returns similar os.tmpname() function result.

I forked the repository and edited the code in z.lua (here and here) in a way that it is now compatible with both cases.

If you are willing to accept the changes I can send you a pull request.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in z.lua, focusing on the os.tmpname() handling described in the issue and compare the linked commits 834c258 and c6090a9. Reproduce the behavior with Lua 5.2 and Clink on Windows, then verify that both MinGW- and MSVC-built Lua runtimes work without breaking the existing fzf integration.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.