]> git.tuebingen.mpg.de Git - gsu.git/commitdiff
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)
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.


No differences found