Fix completion of rvm subcommands
Adapt parsing the output of `rvm help` to deal with new formatting of the subcommand list: command :: description While still handling the former format: command - description
This commit is contained in:
parent
ed52808629
commit
9027ad4101
2
src/_rvm
2
src/_rvm
|
@ -52,7 +52,7 @@ case $state in
|
|||
|
||||
cmds)
|
||||
|
||||
cmds=( ${(f)"$(_call_program commands rvm help 2> /dev/null | sed -e '/^== Action/,/^== Implementation/!d; / - /!d; s/^[ *]*\([^ ]*\) *\- *\(.*\)/\1:\2/')"} )
|
||||
cmds=( ${(f)"$(_call_program commands rvm help 2> /dev/null | sed -e '/^== Action/,/^== Implementation/!d; / \(::\|-\) /!d; s/^[ *]*\([^ *]*\)[ *]*\(::\|-\) *\(.*\)/\1:\3/')"} )
|
||||
cmds+=( $(rvm list strings) )
|
||||
_describe -t commands 'rvm command' cmds && ret=0
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue