mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-16 02:27:03 +01:00
Reworked custom script completion (launch_trial)
Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
This commit is contained in:
parent
2d795a2f02
commit
e712ba0861
4 changed files with 29 additions and 29 deletions
|
|
@ -1,28 +0,0 @@
|
|||
#compdef -P (|./)launch_trial.sh
|
||||
|
||||
__launch_trial_list_tests()
|
||||
{
|
||||
tests=($(./launch_trial.sh --list-tests))
|
||||
_describe -t tests 'Select test to run' tests
|
||||
}
|
||||
|
||||
_launch_trial()
|
||||
{
|
||||
typeset -A opt_args
|
||||
local context state line curcontext="$curcontext"
|
||||
|
||||
local ret=1
|
||||
|
||||
_arguments -C : \
|
||||
'(- 1 *)--help[show usage]'\
|
||||
'(- 1 *)--htmlcov[generate html coverage report in htmlcov surbdirectory]'\
|
||||
'(- 1 *)--list-tests[list all tests]'\
|
||||
':projects:__launch_trial_list_tests' \
|
||||
&& ret=0
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
_launch_trial "$@"
|
||||
return $?
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue