mirror of
https://github.com/spf13/cobra
synced 2025-05-04 12:27:22 +00:00
Merge 0e2602dea1
into ceb39aba25
This commit is contained in:
commit
1cde5d3ea9
1 changed files with 7 additions and 1 deletions
|
@ -45,7 +45,13 @@ function __%[1]s_perform_completion
|
|||
__%[1]s_debug "Starting __%[1]s_perform_completion"
|
||||
|
||||
# Extract all args except the last one
|
||||
set -l args (commandline -opc)
|
||||
set -l args (
|
||||
if commandline -x >/dev/null 2>&1
|
||||
commandline -xpc | string escape
|
||||
else
|
||||
commandline -opc
|
||||
end
|
||||
)
|
||||
# Extract the last arg and escape it in case it is a space
|
||||
set -l lastArg (string escape -- (commandline -ct))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue