Closed baodrate closed 1 year ago
Hey @qubidt, thanks for your suggestion.
The behavior for passing arguments to forgit::add
has been deliberately implemented that way in e73cef6856e826173454ddfa1df9fb37fe9cff2f. It makes adding a file via the command line possible using the same command as adding a file interactively, so we don't have to use different commands for each use case. We actually handle arguments the same way on most other forgit commands as well (e.g. forgit::checkout::branch
or forgit::revert::commit
). I noticed that this is not documented, yet, I will put that on my to-do-list.
However, I see your use-case, and I also see that fzf does not support glob syntax. Since I assume we do not want to change the default behavior, I would rather only accept this in combination with an opt-in config, though.
@wfxr @cjappl What do you say?
That's a very reasonable compromise! 😃I'm out of town currently so I can't implement it but I'll update the pr when I'm able
Pinging @qubidt - we will close soon unless we hear a response / updated PR :)
sorry! dropped off my plate but I'll see if I can revisit this soon!
Closing, can re-open in the future if we get some new revisions :)
currently, passing arguments to
forgit::add
bypasses the interactive selector and are passed directly togit add
. This isn't particularly useful. So pass the arguments to thegit status
call instead, so fzf can be used to interactively select from the list.This is particularly useful when calling
git forgit add
against a subdirectory or a shell glob (e.g.git forgit add *(om[1,5])
)Check list
Description
Type of change
Test environment