diff options
Diffstat (limited to 'lua/telescope/make_entry.lua')
| -rw-r--r-- | lua/telescope/make_entry.lua | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/lua/telescope/make_entry.lua b/lua/telescope/make_entry.lua index 5e7d493..906eb95 100644 --- a/lua/telescope/make_entry.lua +++ b/lua/telescope/make_entry.lua @@ -134,7 +134,7 @@ do end local execute_keys = { - path = function(t) + path = function(t) return t.cwd .. path.separator .. t.filename, false end, @@ -215,6 +215,24 @@ do end end +function make_entry.gen_from_git_commits(opts) + opts = opts or {} + + return function(entry) + if entry == "" then + return nil + end + + local sha, msg = string.match(entry, '([^ ]+) (.+)') + + return { + value = sha, + ordinal = sha .. ' ' .. msg, + display = sha .. ' ' .. msg, + } + end +end + function make_entry.gen_from_quickfix(opts) opts = opts or {} opts.tail_path = get_default(opts.tail_path, true) |
