-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: methylDragon <[email protected]>
- Loading branch information
1 parent
9ee6e70
commit 44f60f6
Showing
9 changed files
with
87 additions
and
52 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# gz bash completion | ||
|
||
function _gz | ||
{ | ||
local prev cur cmd opts | ||
local gz="$1" | ||
COMPREPLY=() | ||
cur="$2" | ||
prev="$3" | ||
|
||
# searching for the command | ||
for ((i=1; $i<=$COMP_CWORD; i++)); do | ||
if [[ ${COMP_WORDS[i]} != -* ]]; then | ||
cmd="${COMP_WORDS[i]}" | ||
break | ||
fi | ||
done | ||
|
||
if [[ "$cur" == -* ]] || [[ "$prev" != "gz" ]]; then | ||
|
||
if [[ "$cmd" == "help" ]]; then | ||
opts=$(gz --commands) | ||
else | ||
COMPREPLY=($(compgen -f -- "${COMP_WORDS[${COMP_CWORD}]}" )) | ||
complete -o filenames -o nospace -F "_gz" "gz" | ||
return | ||
fi | ||
|
||
else | ||
opts="$(gz --commands) help" | ||
fi | ||
|
||
COMPREPLY=($(compgen -W "${opts}" -- ${cur})) | ||
} | ||
complete -F "_gz" "gz" |
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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<testsuites tests="1" failures="0" disabled="0" errors="0" timestamp="@TEST_TIME@" time="0" name="AllTests"> | ||
<testsuite name="@TEST_NAME@" tests="1" failures="0" disabled="0" errors="0" time="0"> | ||
<testcase name="ign_script" status="run" time="0" classname="@TEST_NAME@" /> | ||
<testcase name="GZ_SCRIPT" status="run" time="0" classname="@TEST_NAME@" /> | ||
</testsuite> | ||
</testsuites> |