From bfd1e3471a532028d59c6a9e88fad7ac02793008 Mon Sep 17 00:00:00 2001 From: leiserfg Date: Thu, 20 Jan 2022 11:19:26 +0100 Subject: [PATCH] Set default prompt for ui_select to match the official doc --- lua/fzf-lua/providers/ui_select.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/fzf-lua/providers/ui_select.lua b/lua/fzf-lua/providers/ui_select.lua index 500247b..6e696b0 100644 --- a/lua/fzf-lua/providers/ui_select.lua +++ b/lua/fzf-lua/providers/ui_select.lua @@ -64,10 +64,15 @@ M.ui_select = function(items, opts, on_choice) opts.format_item(e))) end + local prompt = opts.prompt + if not prompt then + prompt = "Select one of:" + end + _opts = _opts or {} _opts.fzf_opts = { ['--no-multi'] = '', - ['--prompt'] = opts.prompt:gsub(":$", "> "), + ['--prompt'] = prompt:gsub(":$", "> "), ['--preview-window'] = 'hidden:right:0', }