Automatically use ldif syntax highlighting for editors that understand
LDIF. (rickh_shelldap@printstring.com)
--- a/shelldap Fri May 03 10:58:03 2013 -0700
+++ b/shelldap Wed May 15 12:17:51 2013 -0700
@@ -617,7 +617,7 @@
#
if ( $use_temp ) {
my ( undef, $fname ) =
- File::Temp::tempfile( 'shelldap_XXXXXXXX', DIR => '/tmp', UNLINK => 1 );
+ File::Temp::tempfile( 'shelldap_XXXXXXXX', SUFFIX => '.ldif', DIR => '/tmp', UNLINK => 1 );
$self->{'ldif'} = Net::LDAP::LDIF->new( $fname, 'w', sort => 1, wrap => $self->wrapsize );
$self->{'ldif_fname'} = $fname;
}
@@ -1352,7 +1352,7 @@
my $fh;
( $fh, $self->{'create_file'} ) =
- File::Temp::tempfile( 'shelldap_XXXXXXXX', DIR => '/tmp', UNLINK => 1 );
+ File::Temp::tempfile( 'shelldap_XXXXXXXX', SUFFIX => '.ldif', DIR => '/tmp', UNLINK => 1 );
# first print out the dn and object classes.
#