Index: trunk/bin/bkmk
===================================================================
--- trunk/bin/bkmk	(revision 120)
+++ trunk/bin/bkmk	(revision 121)
@@ -69,5 +69,24 @@
     },
 
-    #TODO: interactive editing of a bookmark
+    # interactive editing of a bookmark
+    edit => sub {
+        my ($identifier) = @_;
+        my $bookmark = find_bookmark($identifier) or die "Not found\n";
+        my $editor = $ENV{VISUAL} || $ENV{EDITOR} || 'vi';
+        
+        # create a temp file and open it in the user's preferred editor
+        use File::Temp qw{tempfile};
+        my ($fh, $filename) = tempfile(UNLINK => 1);
+        YAML::DumpFile($filename, $bookmark->to_hashref);
+        system($editor, $filename);
+
+        # abort on empty file
+        die "Edit canceled\n" unless -s $filename;
+
+        # update and save the bookmark
+        $bookmark = Bookmark->new(YAML::LoadFile($filename));
+        $bookmarks->update($bookmark);
+        print Dump($bookmark->to_hashref);
+    },
 
     # bulk loading
