diff --git a/src/Taskwarrior.php b/src/Taskwarrior.php index 3ab787b..92dab81 100644 --- a/src/Taskwarrior.php +++ b/src/Taskwarrior.php @@ -18,6 +18,11 @@ class Taskwarrior */ private $rcOptions; + /** + * @var string + */ + private $bin; + /** * @var string */ @@ -32,9 +37,11 @@ class Taskwarrior * @param string $taskrc * @param string $taskData * @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( array( 'rc:' . $taskrc, @@ -163,7 +170,7 @@ class Taskwarrior */ public function command($command, $filter = null, array $options = array()) { - $parts = ['task']; + $parts = [$this->bin]; foreach ($this->rcOptions as $option) { $parts[] = $option; @@ -303,4 +310,4 @@ class Taskwarrior return null; } -} \ No newline at end of file +}