Update of /cvsroot/ldapsh/ldapsh
In directory sc8-pr-cvs1:/tmp/cvs-serv20680
Modified Files:
ldapsh
Log Message:
Look for help in rc files as well (patch 629878)
Index: ldapsh
===================================================================
RCS file: /cvsroot/ldapsh/ldapsh/ldapsh,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** ldapsh 27 May 2003 12:02:08 -0000 1.12
--- ldapsh 27 May 2003 12:04:19 -0000 1.13
***************
*** 663,666 ****
--- 663,671 ----
require File::Temp;
my (undef, $podfile) = File::Temp::tempfile(UNLINK=>1);
+ my @docfiles = ($0);
+ my $found = 0;
+ push(@docfiles, $Opts->{GlobalRCFile}) if (-r $Opts->{GlobalRCFile});
+ push(@docfiles, $Opts->{RCFile}) if (-r $Opts->{RCFile});
+ foreach my $file (@docfiles) {
Pod::Select::podselect(
{
***************
*** 671,680 ****
"COMMANDS/.*/${cmd}"
]
! }, $0);
if (-s $podfile) {
print STDERR "\n------------------------------\n";
$parser->parse_from_file($podfile, \*STDERR);
print STDERR "\n------------------------------\n";
! } else {
print STDERR "No help found on '$cmd'\n\n";
}
--- 676,689 ----
"COMMANDS/.*/${cmd}"
]
! }, $file);
if (-s $podfile) {
print STDERR "\n------------------------------\n";
$parser->parse_from_file($podfile, \*STDERR);
print STDERR "\n------------------------------\n";
! $found = 1;
! last;
! }
! }
! if (! $found) {
print STDERR "No help found on '$cmd'\n\n";
}
|