aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mark.fish12
1 files changed, 12 insertions, 0 deletions
diff --git a/mark.fish b/mark.fish
index fcfdbe8..5bce3b1 100644
--- a/mark.fish
+++ b/mark.fish
@@ -133,6 +133,18 @@ function mark --argument cmd date
switch "$cmd"
case "print"
mark_print_dates $date $argv[3] $argv[4]
+ case "edit" "e"
+ set store (mark_find_store)
+ if test ! -z "$VISUAL"
+ eval $VISUAL $store
+ else if test ! -z "EDITOR"
+ eval $EDITOR $store
+ else if type -q "xdg-open"
+ xdg-open $store
+ else
+ echo "Don't know how to open marks."
+ echo "Please set VISUAL or EDITOR in your environment."
+ end
case "*"
set store (mark_find_store)