-
-
Notifications
You must be signed in to change notification settings - Fork 784
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #673 from OpportunityLiu/dev
improve tab complete
- Loading branch information
Showing
33 changed files
with
684 additions
and
393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
# parameter completions for *nix shell | ||
|
||
if [[ "$SHELL" = */zsh ]]; then | ||
# zsh parameter completion for xmake | ||
_xmake_zsh_complete() | ||
{ | ||
local completions=("$(XMAKE_SKIP_HISTORY=1 XMAKE_ROOT=y xmake lua private.utils.complete 0 nospace "$words")") | ||
reply=( "${(ps:\n:)completions}" ) | ||
} | ||
compctl -f -S "" -K _xmake_zsh_complete xmake | ||
elif [[ "$SHELL" = */bash ]]; then | ||
# bash parameter completion for xmake | ||
_xmake_bash_complete() | ||
{ | ||
local word=${COMP_WORDS[COMP_CWORD]} | ||
local completions | ||
completions="$(XMAKE_SKIP_HISTORY=1 XMAKE_ROOT=y xmake lua private.utils.complete "${COMP_POINT}" "nospace-nokey" "${COMP_LINE}")" | ||
if [ $? -ne 0 ]; then | ||
completions="" | ||
fi | ||
COMPREPLY=( $(compgen -W "$completions") ) | ||
} | ||
complete -o default -o nospace -F _xmake_bash_complete xmake | ||
fi | ||
|
This file was deleted.
Oops, something went wrong.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.