skywind3000 / skywind3000/z.lua
Let z -c match only the relative part of directory
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 3.1k
- Forks
- 148
- PR merge metrics
- No merged PRs in 30d
Description
Currently, z -c (and other options) match patterns against the whole directory to filter. However, this can be confusing (especially for z -c). As an example, assume z outputs:
2 /home/user/h
4 /home/user/a
Now at /home/user, z -c h goes to a, because '/home' contains 'h' and matches the pattern. This looks confusing for me, I suppose that z -c, as all its possible targets share the same prefix, should not match patterns against that prefix (pwd).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the z -c option handling and trace how directory patterns are matched against the current working directory. Reproduce the example from the issue, then verify that matching ignores the shared pwd prefix and selects the relative directory part instead.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100