We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc9fa05 commit 4589322Copy full SHA for 4589322
lua/prompt/utils.lua
@@ -7,9 +7,14 @@ local M = {}
7
---@return table
8
function M.get_parser()
9
-- Define the command-line argument parser.
10
-
+ local name
11
+ if arg and arg[0] then
12
+ name = arg[0]:gsub(".*/", "")
13
+ else
14
+ name = prompt.name .. "p"
15
+ end
16
local parser = argparse()
- :name(arg[0]:gsub(".*/", ""))
17
+ :name(name)
18
:description "A Lua command prompt with pretty-printing and auto-completion."
19
:add_help "-h"
20
:add_complete({ hidden = true })
0 commit comments