Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Git-add completion should show full file paths



Hi all,

Daniel Shahaf kindly reviewed this pull request of mine:
https://github.com/zsh-users/zsh/pull/55.

The code turned out to be wrong but I'll summarise what would be nice
to have here:

If you have multiple files buried under subfolders, the current
completions only show top level folders.

Example, if you have a folder `src` containing files `bar1` and `bar2`:

```
% git add <TAB>
 -- modified file --
src
 -- untracked file --
foo  src
```

What I want is:

```
% git add <TAB>
 -- Unstaged --
foo       src/bar1  src/bar2
```

Quoting Daniel:

I see that offering `src/bar1` and `src/bar2` right off the bat can be
useful. However, I'm not sure how best to implement it. I wonder if it
would make sense to teach `_multi_parts` some sort of
`dont-try-to-be-smart-just-offer-all-matches-right-off-the-bat`
zstyle. This would solve the problem for every use of `_multi_parts`.

End quote.

Can anyone here comment on the above idea and/or suggest a way to
implement this?

Thank you in advance.


-- 
Amyn Bennamane



Messages sorted by: Reverse Date, Date, Thread, Author