From 2d9714f35f64b39c8672e539a1c2f6f2d6d23ee9 Mon Sep 17 00:00:00 2001
From: Gerhard Gonter <ggonter@gmail.com>
Date: Mon, 30 Mar 2015 17:13:33 +0200
Subject: [PATCH] add --edit flag to POD; fix editor call

---
 textarchive/vlib001.pl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/textarchive/vlib001.pl b/textarchive/vlib001.pl
index db33590..1c66386 100755
--- a/textarchive/vlib001.pl
+++ b/textarchive/vlib001.pl
@@ -18,6 +18,7 @@
   * --lookup   ... lookup for hashes given as parameters
   * --limit <n> ... check up <n> files
   * --noinode   ... ignore the inode
+  * --edit      ... edit configuration
   * -D ... increase debug level
   * -X ... stop after setup (useful as option -DX)
 
@@ -64,6 +65,7 @@ my $limit= undef;
 my $cat_file= '_catalog';
 my $ino_file= '_catalog.inodes';
 my $check_inode= 1;
+my $EDITOR= $ENV{'EDITOR'} || '/bin/vi';
 
 my @hdr= qw(md5 path mtime fs_size ino);
 
@@ -117,7 +119,7 @@ unless (defined ($project))
 if ($op_mode eq 'edit')
 {
   my ($proj_cfg_dir, $proj_cfg_fnm)= TA::ObjReg::_get_project_paths($project);
-  system ("\$EDITOR '$proj_cfg_fnm'");
+  system ($EDITOR, $proj_cfg_fnm);
   # print "store_cfg: ", Dumper ($store_cfg);
   exit;
 }
-- 
GitLab