# HG changeset patch # User Mahlon E. Smith # Date 1368645471 25200 # Node ID 94b64bbf93cfdfaf0ee68c54cd60bd85865fcb47 # Parent 85cc85d0c1b15673dc522a4535aed64f39b2e55e Automatically use ldif syntax highlighting for editors that understand LDIF. (rickh_shelldap@printstring.com) diff -r 85cc85d0c1b1 -r 94b64bbf93cf 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. #