Allow editor arguments when editing files externally.
authorAndr Goens <andres.goens@tu-dresden.de>
Tue, 08 Dec 2015 00:35:43 -0800
changeset 80 0ccbd586bfc6
parent 79 377bd38ab38c
child 81 c39a13f112b6
Allow editor arguments when editing files externally.
shelldap
--- a/shelldap	Wed Mar 04 11:21:00 2015 -0800
+++ b/shelldap	Tue Dec 08 00:35:43 2015 -0800
@@ -1628,7 +1628,10 @@
 	# checksum it, then open it in an editor
 	#
 	my $hash_orig = $self->chksum( $self->{'ldif_fname'} );
-	system( $self->{'editor'}, $self->{'ldif_fname'} ) &&
+	my @edit_args = split(' ',$self->{'editor'});
+	push(@edit_args,$self->{'ldif_fname'});
+	#	system( $self->{'editor'}, $self->{'ldif_fname'} ) &&
+	system( @edit_args ) &&
 		die "Unable to launch editor: $!\n";
 
 	# detect a total lack of change