skywind3000 / skywind3000/z.lua

Trailing path separators should be ignored

Open
#105 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

It is easy to add a path with trailing path separator to the .zlua file.
Enhanced matching does not work properly for the paths with trailing path separators.

I fixed it by replacing regular expression here: https://github.com/skywind3000/z.lua/blob/master/z.lua#L1248: ".*(/.*)" -> ".*(/.+)"

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

Read z.lua around line 1248 and reproduce enhanced matching with a path ending in a separator. Apply the regular-expression change described in the issue, then verify that trailing separators no longer prevent the match.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
cli
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.