From cac3f53df7354bea1646cf1d595f17776f2ca470 Mon Sep 17 00:00:00 2001 From: JG Date: Mon, 16 Jun 2025 11:32:04 -0400 Subject: [PATCH] Update examples Modify regex for files, a file should not end with "/" Add a dirs example, to copy to clipboard some annotation that has a directory path --- examples/default | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/default b/examples/default index a284fa1..4ab4090 100644 --- a/examples/default +++ b/examples/default @@ -7,7 +7,7 @@ no_annotation_hook="addnote $ID" notes.regex = "^Notes\\.(.*)" notes.command = "editnote ~/Notes/tasknotes/$UUID.$LAST_MATCH \"$TASK_DESCRIPTION\" $UUID" -files.regex = "^[\\.\\/~]+.*\\.(.*)" +files.regex="^[\\.\\/~]+.*\\.(.*)^/$" files.command = "xdg-open $FILE" files.filtercommand = "test -e $FILE" @@ -28,3 +28,9 @@ alias.notes = "normal --include=notes" alias.edit = "normal --include=edit" alias.delete = "normal --include=delete" alias.raw = "any --include=delete,edit" + +dirs.target=annotations +dirs.regex="^/(.*)?/" +dirs.command="wl-copy -n cd $FILE" # on wayland, copy the PATH to clipboar or use it to cd $(taskopen ID) directly +dirs.filtercommand = "test -d $FILE" +dirs.modes="batch,any,normal"