From 9fd242db260a63d8b788d1edbabd2d76a55a2d61 Mon Sep 17 00:00:00 2001 From: Amirreza Askarpour Date: Tue, 11 May 2021 12:50:57 +0430 Subject: feat: add git_stash picker (#800) --- lua/telescope/make_entry.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lua/telescope/make_entry.lua') diff --git a/lua/telescope/make_entry.lua b/lua/telescope/make_entry.lua index 9435354..39106e0 100644 --- a/lua/telescope/make_entry.lua +++ b/lua/telescope/make_entry.lua @@ -240,6 +240,21 @@ do end end +function make_entry.gen_from_git_stash() + return function(entry) + if entry == "" then + return nil + end + local splitted = vim.split(entry, ':') + return { + value = splitted[1], + ordinal = splitted[3], + display = splitted[3] + } + end +end + + function make_entry.gen_from_git_commits() local displayer = entry_display.create { separator = " ", -- cgit v1.2.3