configurable taskwarrior path
This commit is contained in:
parent
372882e5f4
commit
c96bd153a4
@ -18,6 +18,11 @@ class Taskwarrior
|
|||||||
*/
|
*/
|
||||||
private $rcOptions;
|
private $rcOptions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
private $bin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
@ -32,9 +37,11 @@ class Taskwarrior
|
|||||||
* @param string $taskrc
|
* @param string $taskrc
|
||||||
* @param string $taskData
|
* @param string $taskData
|
||||||
* @param array $rcOptions
|
* @param array $rcOptions
|
||||||
|
* @param string $bin
|
||||||
*/
|
*/
|
||||||
public function __construct($taskrc = '~/.taskrc', $taskData = '~/.task', $rcOptions = [])
|
public function __construct($taskrc = '~/.taskrc', $taskData = '~/.task', $rcOptions = [], $bin = 'task')
|
||||||
{
|
{
|
||||||
|
$this->bin = $bin;
|
||||||
$this->rcOptions = array_merge(
|
$this->rcOptions = array_merge(
|
||||||
array(
|
array(
|
||||||
'rc:' . $taskrc,
|
'rc:' . $taskrc,
|
||||||
@ -163,7 +170,7 @@ class Taskwarrior
|
|||||||
*/
|
*/
|
||||||
public function command($command, $filter = null, array $options = array())
|
public function command($command, $filter = null, array $options = array())
|
||||||
{
|
{
|
||||||
$parts = ['task'];
|
$parts = [$this->bin];
|
||||||
|
|
||||||
foreach ($this->rcOptions as $option) {
|
foreach ($this->rcOptions as $option) {
|
||||||
$parts[] = $option;
|
$parts[] = $option;
|
||||||
|
Loading…
Reference in New Issue
Block a user