mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00

- Tweaks to the Lua and extension API. Note that this is a documentation-only change, meaning the design is being honed. No support exists yet.
45 lines
1.2 KiB
Lua
45 lines
1.2 KiB
Lua
-- Command Extension.
|
|
-- Implementing 'random'.
|
|
|
|
-- Arguments: None
|
|
-- Returns: An 8-element list of installation details. Only called once, on
|
|
-- installation of the extension.
|
|
function install ()
|
|
return 'command', -- Type
|
|
'random', -- Name
|
|
'1.0', -- Version
|
|
'Displays a random pending task', -- Description
|
|
'Paul Beckingham', -- Author
|
|
'paul@beckingham.net', -- Contact
|
|
'MIT', -- License
|
|
'© 2012, Göteborg Bit Factory' -- Copyright
|
|
end
|
|
|
|
-- Arguments: None
|
|
-- Returns: Usage syntax, such as "task random"
|
|
function usage ()
|
|
return 'task random'
|
|
end
|
|
|
|
-- Arguments: None
|
|
-- Returns: 1 --> command does not modify data
|
|
-- 0 --> command modifies data
|
|
function read_only ()
|
|
return true
|
|
end
|
|
|
|
-- Arguments: None
|
|
-- Returns: 1 --> command displays task ID
|
|
-- 0 --> no ID displayed
|
|
function display_id ()
|
|
return true
|
|
end
|
|
|
|
-- Arguments: None
|
|
-- Returns: 1 --> command failed
|
|
-- 0 --> success
|
|
function execute (command_line)
|
|
task_footnote_message ('Not implemented')
|
|
return 1
|
|
end
|
|
|