summaryrefslogtreecommitdiff
path: root/dh
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-08-26 16:41:53 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-08-26 16:41:53 -0400
commitd64e9b242a1c3c9b35f006eec048a3cf683fc925 (patch)
tree2b5cfda6bce7b3b3a762200b998505691d46a251 /dh
parent391a6c42bc528de0e3ba34874346d290054f517e (diff)
drop regex support from remove_command_options
I hope that it will not be needed; indeed I doubt that remove_command_options will be used much, because sequence addons would need to try to do conflicting things to need it. And the interface makes it hard for such conflicting sequence addons to work around the other, since addons can be loaded in either order. So let's not encourage them too much, and if there's a use case later, we can made changes. I haven't applied Modestas's enhanced patch that allows adding an option to all commands because I similarly think it might not be used. If a use case comes along we can add something like that.
Diffstat (limited to 'dh')
-rwxr-xr-xdh7
1 files changed, 1 insertions, 6 deletions
diff --git a/dh b/dh
index f03bf006..710117ea 100755
--- a/dh
+++ b/dh
@@ -346,12 +346,7 @@ sub remove_command_options {
# Remove only specified options
if (my $opts = $command_opts{$command}) {
foreach my $opt (@_) {
- if (ref($opt) eq "Regexp") {
- $opts = [ grep ! /$opt/, @$opts ];
- }
- else {
- $opts = [ grep { $_ ne $opt } @$opts ];
- }
+ $opts = [ grep { $_ ne $opt } @$opts ];
}
$command_opts{$command} = $opts;
}