diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-08-20 01:00:25 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-08-20 01:00:25 +0200 |
| commit | 2986dfcd4cfcd024d24426c73c0de97b0a3189bb (patch) | |
| tree | 91608c0cff254ab776f8d7a852e6e6bb559b0840 | |
| parent | fdae89fac1e5491d5902c48dbf7c14e0bd4435cc (diff) | |
| download | mark-2986dfcd4cfcd024d24426c73c0de97b0a3189bb.tar.gz mark-2986dfcd4cfcd024d24426c73c0de97b0a3189bb.zip | |
add edit command
"mark edit" or "mark e" will open the mark store file in an editor or
using xdg-open.
| -rw-r--r-- | mark.fish | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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) |
