36 lines
821 B
Diff
36 lines
821 B
Diff
|
--- /usr/bin/mimeopen 2006-10-11 16:57:53.000000000 +0200
|
||
|
+++ mimeopen 2006-10-11 21:27:45.000000000 +0200
|
||
|
@@ -24,6 +24,7 @@
|
||
|
'magic-only' => ['M'],
|
||
|
'ask' => ['a'],
|
||
|
'ask-default' => ['d'],
|
||
|
+ 'no-ask' => ['n'],
|
||
|
);
|
||
|
|
||
|
while ((@ARGV) && ($ARGV[0] =~ /^-/)) {
|
||
|
@@ -153,7 +154,10 @@
|
||
|
exit 6;
|
||
|
}
|
||
|
|
||
|
-if ($args{ask}) {
|
||
|
+if ($args{'no-ask'}) {
|
||
|
+ $default = defined($default) ? $default : $other[0];
|
||
|
+}
|
||
|
+elsif ($args{ask}) {
|
||
|
$default = choose($mimetype, 0, grep defined($_), $default, @other);
|
||
|
}
|
||
|
elsif ($args{'ask-default'}) {
|
||
|
@@ -305,6 +309,12 @@
|
||
|
|
||
|
Print the version of the program and exit.
|
||
|
|
||
|
+=item B<-n>, B<--no-ask>
|
||
|
+
|
||
|
+Don't ask the user which program to use. Choose the default program or the
|
||
|
+first program known to handle the file mimetype. This does not set the
|
||
|
+default application.
|
||
|
+
|
||
|
=back
|
||
|
|
||
|
=head1 BUGS
|