Automatically use ldif syntax highlighting for editors that understand
authorMahlon E. Smith <mahlon@laika.com>
Wed, 15 May 2013 12:17:51 -0700
changeset 58 94b64bbf93cf
parent 57 85cc85d0c1b1
child 59 5b122351067c
Automatically use ldif syntax highlighting for editors that understand LDIF. (rickh_shelldap@printstring.com)
shelldap
--- 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.
 		#