]> git.tuebingen.mpg.de Git - gsu.git/commit
gsu: Avoid duplication of command regex.
authorAndre Noll <maan@systemlinux.org>
Tue, 2 Aug 2011 13:09:21 +0000 (15:09 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 29 Aug 2014 19:39:58 +0000 (21:39 +0200)
commitc54761ffae2f3fd24db97a447a6db5d90959a1d6
treedabb360f07b26344babe6a3903d9420731c85b69
parent07b6ec565d18f19d853f30957cf3923cd9a99ca1
gsu: Avoid duplication of command regex.

The regular expression for fining the subcommands was duplicated
four times in gsu. Needless to say that this resulted in more than
one variant of the expression...

Avoid this duplication by introducing the global gsu_command_regex
variable. While at it, use a more clever sed command in
_gsu_available_commands() which allows to kill a grep command.
funcs/gsu