Update of /cvsroot/ldapsh/ldapsh
In directory sc8-pr-cvs1:/tmp/cvs-serv3039
Modified Files:
Tag: PATCH-778364
ldapsh
Log Message:
Adds the "." expansion syntax (sets the search scope to 'base').
Index: ldapsh
===================================================================
RCS file: /cvsroot/ldapsh/ldapsh/ldapsh,v
retrieving revision 1.20
retrieving revision 1.20.4.1
diff -C2 -d -r1.20 -r1.20.4.1
*** ldapsh 27 Jul 2003 07:03:01 -0000 1.20
--- ldapsh 27 Jul 2003 07:34:55 -0000 1.20.4.1
***************
*** 124,133 ****
(composed of B<Net::LDAP::Entry> entries).
! =item 2. E<lt>functionE<gt> ['-r']
This is like the previous usage. The search filter is C<(objectclass=*)>.
! If the C<-r> option is used, the scope is I<sub>.
! Otherwise, the scope is I<one>.
=item 3. E<lt>functionE<gt> $entries
--- 124,135 ----
(composed of B<Net::LDAP::Entry> entries).
! =item 2. E<lt>functionE<gt> ['-r'|.]
This is like the previous usage. The search filter is C<(objectclass=*)>.
! If neither C<-r> nor the dot (a.k.a. "full stop" or "period") is given, the
! scope is I<one>. If C<-r> is given, the scope is I<sub>. If the dot is
! given, the scope is I<base> (this can be used to match the I<current working
! directory> itself).
=item 3. E<lt>functionE<gt> $entries
***************
*** 463,472 ****
push(@entries, @$spec);
} else {
! my $searchedEntries = _search(
! BaseDN => $Globals->{CWD}{VALUE},
! Scope => $Options->{r} ? 'sub' : 'one',
! Filter => $spec,
! Attribs => []
! );
if (defined($searchedEntries)) {
push(@entries, @$searchedEntries);
--- 465,484 ----
push(@entries, @$spec);
} else {
! my $searchedEntries;
! if ($spec =~ /^\.$/) {
! $searchedEntries = _search(
! BaseDN => $Globals->{CWD}{VALUE},
! Scope => 'base',
! Filter => '(objectclass=*)',
! Attribs => []
! );
! } else {
! $searchedEntries = _search(
! BaseDN => $Globals->{CWD}{VALUE},
! Scope => $Options->{r} ? 'sub' : 'one',
! Filter => $spec,
! Attribs => []
! );
! }
if (defined($searchedEntries)) {
push(@entries, @$searchedEntries);
***************
*** 2080,2084 ****
# The line below will quote some barewords such as "-l", "-a" etc...
# It's not perfect, but simple
! while (s/([\s,])(-\w)([\s,]|$)/$1'$2'$3/g) {};
my $redir;
--- 2092,2096 ----
# The line below will quote some barewords such as "-l", "-a" etc...
# It's not perfect, but simple
! while (s/([\s,])(-\w|\.)([\s,]|$)/$1'$2'$3/g) {};
my $redir;
|