GothenburgBitFactory / GothenburgBitFactory/taskwarrior

An alias to "execute task-*" confuses task

Open
#2,105 2 comments 0 reactions 0 assignees View on GitHub
eval:reproduced triaged type:bug
Dominant language
C++
Stars
6.1k
Forks
423
Avg merge
1d 19h
Merged PRs (30d)
11

Description

Using `task` 2.6.0 (at commit 51a5a73c0, but also on the `master` branch), the following command:

```
task rc.alias.attach='execute task-attach' attach …
```

really confuses `task`, which seems to handle the `task-*` prefix specially. According to `strace`, the above results in the following call:

```
[pid 25304] execve("/bin/sh", ["sh", "-c", "- task - execute task - execute task - execute task - execute task - execute task - execute task - execute task - execute task - execute task - execute task - execute task - execute task - execute task - execute task - execute task - execute task - execute task - execute task - execute task - execute task - attach 33"], 0x7ffd7da8e000 /* 56 vars */) = 0
```

Using `task_attach` works, as does `anything-else`.

Note that using `anything-doesnotexist` actually causes `task` to attempt to evaluate the expression:

```
~/.bin% task rc.alias.test='execute task-nonexistent' test
[task next ( - nonexistent )]
Cannot subtract strings
Configuration override rc.alias.test:execute task-nonexistent
~/.bin% task rc.alias.test='execute foo-nonexistent' test
sh: 1: foo: not found
Configuration override rc.alias.test:execute foo-nonexistent
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.