diff options
| author | Opportunity <[email protected]> | 2020-01-15 18:07:08 +0800 |
|---|---|---|
| committer | Opportunity <[email protected]> | 2020-01-15 18:07:08 +0800 |
| commit | f005776c9b847595225f5e490639fcc4a159f845 (patch) | |
| tree | c188bd117cded065bf74aba71fbc27c3dd194044 /scripts | |
| parent | 741857e2c91b67b75e763b17ccdc6909bbc41709 (diff) | |
fix complete
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/get.sh | 4 | ||||
| -rw-r--r-- | scripts/register-completions.bash | 2 | ||||
| -rw-r--r-- | scripts/register-completions.ps1 | 2 | ||||
| -rw-r--r-- | scripts/register-completions.zsh | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/scripts/get.sh b/scripts/get.sh index c57f3bf4f..5f6bde3c2 100755 --- a/scripts/get.sh +++ b/scripts/get.sh @@ -170,7 +170,7 @@ if [[ "$SHELL" = */zsh ]]; then _xmake_zsh_complete() { - local completions=("$(XMAKE_SKIP_HISTORY=1 xmake lua private.utils.complete 0 nospace "$words")") + local completions=("$(XMAKE_SKIP_HISTORY=1 xmake lua --root private.utils.complete 0 nospace "$words")") reply=( "${(ps:\n:)completions}" ) } @@ -185,7 +185,7 @@ elif [[ "$SHELL" = */bash ]]; then local word=${COMP_WORDS[COMP_CWORD]} local completions - completions="$(XMAKE_SKIP_HISTORY=1 xmake lua private.utils.complete "${COMP_POINT}" "${COMP_LINE}" 2>/dev/null)" + completions="$(XMAKE_SKIP_HISTORY=1 xmake lua --root private.utils.complete "${COMP_POINT}" "${COMP_LINE}" 2>/dev/null)" if [ $? -ne 0 ]; then completions="" fi diff --git a/scripts/register-completions.bash b/scripts/register-completions.bash index 9d5865cd6..e45ce6489 100644 --- a/scripts/register-completions.bash +++ b/scripts/register-completions.bash @@ -5,7 +5,7 @@ _xmake_bash_complete() local word=${COMP_WORDS[COMP_CWORD]} local completions - completions="$(XMAKE_SKIP_HISTORY=1 xmake lua private.utils.complete "${COMP_POINT}" "${COMP_LINE}" 2>/dev/null)" + completions="$(XMAKE_SKIP_HISTORY=1 xmake lua --root private.utils.complete "${COMP_POINT}" "${COMP_LINE}" 2>/dev/null)" if [ $? -ne 0 ]; then completions="" fi diff --git a/scripts/register-completions.ps1 b/scripts/register-completions.ps1 index f7e3e5da4..a9ecd7877 100644 --- a/scripts/register-completions.ps1 +++ b/scripts/register-completions.ps1 @@ -8,7 +8,7 @@ Register-ArgumentCompleter -Native -CommandName xmake -ScriptBlock { } $oldenv = $env:XMAKE_SKIP_HISTORY $env:XMAKE_SKIP_HISTORY = 1 - xmake lua private.utils.complete "0" "nospace" "$complete" | ForEach-Object { + xmake lua --root private.utils.complete "0" "nospace" "$complete" | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) } $env:XMAKE_SKIP_HISTORY = $oldenv diff --git a/scripts/register-completions.zsh b/scripts/register-completions.zsh index 82f588d5f..5c16cf334 100644 --- a/scripts/register-completions.zsh +++ b/scripts/register-completions.zsh @@ -2,7 +2,7 @@ _xmake_zsh_complete() { - local completions=("$(XMAKE_SKIP_HISTORY=1 xmake lua private.utils.complete 0 nospace "$words")") + local completions=("$(XMAKE_SKIP_HISTORY=1 xmake lua --root private.utils.complete 0 nospace "$words")") reply=( "${(ps:\n:)completions}" ) } |
