Taskwarrior::Kusarigama::Plugin::Command::Open - open links associated to a task
version 0.12.0
# open the link(s) of task 123 $ task 123 open # only consider the wiki link $ task 123 open wiki
Looks into the annotations of the task for link thingies, and open them.
If the command finds exactly one link, it'll open it. If more than one is found, you'll be given the choice of which one you wish to launch.
The format for annotated links is format:path. The different formats live in the .taskrc. When installed, the plugin will set up the http and https format, but you can add as many as you want. E.g.
format:path
http
https
$ task config kusarigama.plugin.open.http 'xdg-open {{{link}}}' $ task config kusarigama.plugin.open.https 'xdg-open {{{link}}}' $ task config kusarigama.plugin.open.wiki 'tmux split-window "nvim /home/yanick/vimwiki/{{{path}}}.mkd"'
The commands are Mustache templates (using Template::Mustache). The context provided to the template has three variables: link (e.g., wiki:my_page), path (my_page) and task, which is the associated task object.
link
wiki:my_page
path
my_page
task
Note that in the examples I'm using the triple bracket notation such that the '/' in the paths don't get escaped.
If you want to set more than one opening action for a type, append -action to it. E.g.:
-action
$ task config kusarigama.plugin.open.wiki 'cat "/home/yanick/vimwiki/{{{path}}}.mkd"' $ task config kusarigama.plugin.open.wiki-edit 'tmux split-window "nvim /home/yanick/vimwiki/{{{path}}}.mkd"' $ task open wiki # prints it $ task open wiki-edit # opens editor
$ task-kusarigama add Command::Plugin
https://github.com/ValiValpas/taskopen - shell-based inspiration for this plugin.
Yanick Champoux <yanick@cpan.org>
This software is copyright (c) 2019, 2018, 2017 by Yanick Champoux.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Taskwarrior::Kusarigama, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Taskwarrior::Kusarigama
CPAN shell
perl -MCPAN -e shell install Taskwarrior::Kusarigama
For more information on module installation, please visit the detailed CPAN module installation guide.