Stephen Boyd wrote: > Is there some way to compute these lists with some magical function instead > of duplicating that logic over and over? Maybe roughly like this. for command in $porcelain do eval "__git_${command//-/_}_options=" done __git_complete_for_command () { local options local options_var="__git_${command//-/_}_options" eval "options=\$$options_var" if test -z "$options" then eval "$options_var=\$(__git_list_command_options \$command)" eval "options=\$$options_var" fi ... } _git () { ... __git_complete_for_command "$command" } Jonathan -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html