summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/telescope/builtin/git.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/lua/telescope/builtin/git.lua b/lua/telescope/builtin/git.lua
index 98551ca..f120655 100644
--- a/lua/telescope/builtin/git.lua
+++ b/lua/telescope/builtin/git.lua
@@ -127,7 +127,14 @@ end
git.status = function(opts)
local gen_new_finder = function()
- local output = utils.get_os_command_output({ 'git', 'status', '-s', '--', '.' }, opts.cwd)
+ local expand_dir = utils.if_nil(opts.expand_dir, true, opts.expand_dir)
+ local git_cmd = {'git', 'status', '-s', '--', '.'}
+
+ if expand_dir then
+ table.insert(git_cmd, table.getn(git_cmd) - 1, '-u')
+ end
+
+ local output = utils.get_os_command_output(git_cmd, opts.cwd)
if table.getn(output) == 0 then
print('No changes found')