docs(git_status): add missing opt expand_dir (#2824)

* docs(git_status): add missing opt `expand_dir`

* [docgen] Update doc/telescope.txt
skip-checks: true

---------

Co-authored-by: Github Actions <actions@github>
This commit is contained in:
James Trew
2023-12-25 11:45:01 -05:00
committed by GitHub
parent 9907deaed2
commit fa4d663c8c
3 changed files with 36 additions and 28 deletions

View File

@@ -365,12 +365,13 @@ git.status = function(opts)
return
end
local args = { "status", "--porcelain=v1", "--", "." }
local gen_new_finder = function()
local expand_dir = vim.F.if_nil(opts.expand_dir, true)
local git_cmd = git_command({ "status", "--porcelain=v1", "--", "." }, opts)
if expand_dir then
table.insert(git_cmd, #git_cmd - 1, "-u")
if vim.F.if_nil(opts.expand_dir, true) then
table.insert(args, #args - 1, "-uall")
end
local git_cmd = git_command(args, opts)
opts.entry_maker = vim.F.if_nil(opts.entry_maker, make_entry.gen_from_git_status(opts))
return finders.new_oneshot_job(git_cmd, opts)
end