From 279c1ab1336b67b144d39f1d0bbd256cd4510b20 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 2 Aug 2011 15:12:48 +0200 Subject: [PATCH] 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. --- funcs/gsu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() { -- 2.39.2