From 9027ad410191a1c134a1ee7b5906759db767b763 Mon Sep 17 00:00:00 2001 From: Aaron Schrab Date: Sun, 26 Aug 2012 01:16:55 -0400 Subject: [PATCH] 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 --- src/_rvm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_rvm b/src/_rvm index d1304a1..37dceab 100644 --- a/src/_rvm +++ b/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 ;;