File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -2020,9 +2020,14 @@ function main(argv)
2020
2020
z_print (M , true , false )
2021
2021
end
2022
2022
elseif options [' --complete' ] then
2023
- local line = args [1 ] and args [1 ] or ' '
2024
- local head = line :sub (Z_CMD :len ()+ 1 ):gsub (' ^%s+' , ' ' )
2025
- local M = z_match ({head }, Z_METHOD , Z_SUBDIR )
2023
+ local M = {}
2024
+ if options [' -m1' ] then
2025
+ M = z_match (args and args or {}, Z_METHOD , Z_SUBDIR )
2026
+ else
2027
+ local line = args [1 ] and args [1 ] or ' '
2028
+ local head = line :sub (Z_CMD :len ()+ 1 ):gsub (' ^%s+' , ' ' )
2029
+ M = z_match ({head }, Z_METHOD , Z_SUBDIR )
2030
+ end
2026
2031
for _ , item in pairs (M ) do
2027
2032
print (item .name )
2028
2033
end
@@ -2864,7 +2869,7 @@ $env.config = ($env.config | update hooks.env_change.PWD ($env.config.hooks.env_
2864
2869
]]
2865
2870
2866
2871
local script_complete_nushell = [[
2867
- let zlua_completer = {|spans| $spans | skip 1 | _zlua --complete ...$in | lines | where {|x| $x != $env.PWD}}
2872
+ let zlua_completer = {|spans| $spans | skip 1 | _zlua --complete -m1 ...$in | lines | where {|x| $x != $env.PWD}}
2868
2873
2869
2874
$env.config = ($env.config | default {} completions)
2870
2875
$env.config = ($env.config | update completions ($env.config.completions | default {} external))
You can’t perform that action at this time.
0 commit comments