[LDAPsh-cvs] ldapsh ldapsh,1.17,1.17.6.1
Status: Beta
Brought to you by:
rcorvalan
From: <j-d...@us...> - 2003-07-27 06:30:06
|
Update of /cvsroot/ldapsh/ldapsh In directory sc8-pr-cvs1:/tmp/cvs-serv27818 Modified Files: Tag: PATCH-778347 ldapsh Log Message: Accept command-line arguments (patch 778347). Index: ldapsh =================================================================== RCS file: /cvsroot/ldapsh/ldapsh/ldapsh,v retrieving revision 1.17 retrieving revision 1.17.6.1 diff -C2 -d -r1.17 -r1.17.6.1 *** ldapsh 27 Jul 2003 05:20:40 -0000 1.17 --- ldapsh 27 Jul 2003 06:30:03 -0000 1.17.6.1 *************** *** 18,22 **** =head1 SYNOPSIS ! ldapsh =head1 EXAMPLE --- 18,22 ---- =head1 SYNOPSIS ! ldapsh [expression] =head1 EXAMPLE *************** *** 1911,1914 **** --- 1911,1916 ---- So, in your shell you can type "ads" and get connected to a specific server. + Additionally, you could invoke B<ldapsh> as C<ldapsh ads> to call the function + straight away. Remember: you put in this file Perl code. So you can do whatever you want!!! *************** *** 2066,2074 **** _Init(); while (1) { - my $APP = $Globals->{_APPENDRESULTS}{VALUE} ? '** ' : ''; - my $P = eval('return("' . $Globals->{PROMPT}{VALUE} . '")'); - print $@ unless defined $P; - $_ = $Term->readline($P); last unless defined($_); s/^\s+//; --- 2068,2077 ---- _Init(); + $_ = "@ARGV"; + + # Note: this loop will be executed once before the prompt is shown. + # This is to support command-line arguments and will occur whether + # or not any were given. while (1) { last unless defined($_); s/^\s+//; *************** *** 2096,2099 **** --- 2099,2107 ---- eval() || print STDERR $@; redir if ($redir); + + my $APP = $Globals->{_APPENDRESULTS}{VALUE} ? '** ' : ''; + my $P = eval('return("' . $Globals->{PROMPT}{VALUE} . '")'); + print $@ unless defined $P; + $_ = $Term->readline($P); } |