mirror of
https://github.com/zsh-users/zsh-completions.git
synced 2026-09-17 16:00:19 +00:00
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:
@@ -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
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user