diff --git a/completions/dirx.lua b/completions/dirx.lua index a60fd0f..5fba0c6 100644 --- a/completions/dirx.lua +++ b/completions/dirx.lua @@ -320,7 +320,6 @@ end -- the hide_unless stuff in general. local minus_flags = { concat_one_letter_flags=true, onarg=onarg_dirxcmd } local slash_flags = { concat_one_letter_flags=true } -local one_letter_flags = {} local function copy_vars(entry, tbl) tbl.hide = entry.hide @@ -352,11 +351,6 @@ for _, entry in ipairs(list_of_flags) do else error("unrecognized flag entry format.") end - - if not long then - table.insert(one_letter_flags, minus) - table.insert(one_letter_flags, slash) - end end clink.argmatcher("dirx") diff --git a/modules/arghelper.lua b/modules/arghelper.lua index cc5c7ba..0421712 100644 --- a/modules/arghelper.lua +++ b/modules/arghelper.lua @@ -477,7 +477,8 @@ if not tmp._addexflags or not tmp._addexarg then end local function maybe_one_letter_flag(concat_flags, flag, arginfo, linked) - if is_one_letter_flag(flag) then + local letter,plusminus = is_one_letter_flag(flag) + if letter then table.insert(concat_flags, flag) local tbl = concat_flags[flag] if not tbl then @@ -491,7 +492,7 @@ if not tmp._addexflags or not tmp._addexarg then tbl.one_letter_linked = true end end - if #flag > 2 then + if #flag > 2 and not plusminus then local flag2 = flag:sub(1, 2) if is_one_letter_flag(flag2) and concat_flags[flag2] then concat_flags[flag2].one_letter_arginfo = true