skywind3000 / skywind3000/z.lua

[FR] 当 z 一个文件路径时 cd 到它的目录

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

有时候想要 cd 到某个文件的目录时,往往会先复制这个文件的文件路径,然后删除文件名后再 cd。
如果 z 能够支持当路径是文件时,直接 cd 到它的目录的功能就好了。

谢谢!

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 by locating the path-handling entry point in z.lua and tracing how a target path is resolved before the directory change. Verify the behavior with a path pointing to an existing file and confirm that z changes to its containing directory while directory paths retain their current behavior.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.