From: Andre Noll Date: Tue, 2 Aug 2011 13:12:48 +0000 (+0200) Subject: Allow hyphens in command names. X-Git-Url: http://git.tuebingen.mpg.de/?p=gsu.git;a=commitdiff_plain;h=279c1ab1336b67b144d39f1d0bbd256cd4510b20 Allow hyphens in command names. There is no reason to forbid subcommands with hyphens, and sometimes it is just natural have such a command. For instance if the subcommand wraps an existing command with a hyphen like "apt-get". So change the regular expression for subcommands accordingly. --- diff --git a/funcs/gsu b/funcs/gsu index 63e0acf..1a35fca 100644 --- a/funcs/gsu +++ b/funcs/gsu @@ -139,7 +139,7 @@ export -f _gsu_usage # Each line matching this is recognized as a subcommand. The name # of the subcommand is the first subexpression. -export gsu_command_regex='^com_\([a-zA-Z_0-9]\+\)()' +export gsu_command_regex='^com_\([-a-zA-Z_0-9]\+\)()' _gsu_available_commands() {