3 ###APPAUTHOR: xiaoranzzz
4 ###APPDATE: Thu Feb 14 14:30:06 2008
6 ###APPDESC: View Directory
7 ###APPUSAGE: (directory)
8 ###APPEXAMPLE: viewdir /usr/share/doc/fvwm-crystal
13 exit (system("plhelp",$0,@ARGV)) if($_ eq "-h" || $_ eq "--help");
17 $docdir = "." unless $docdir;
19 my $bzview = "bzless";
22 chdir($docdir) or die("$!\n");
34 print STDERR
$basedir,"\n";
35 my $r = system("ui-select-list","Document list ($basedir:)",@files);
42 print STDERR
"File not exist:$file\n";
45 $file =~ m/\.([^.]*$)/;
46 my $ext = $1 ?
$1 : "";
54 elsif($ext eq "bz" || $ext eq "bz2") {
62 while($choice = listDoc
($docdir,@docs)) {
63 viewdoc
($docdir . "/" . $docs[$choice-1]);