Taskwarrior: Command does not expand when there are non ascii characters before

Created on 21 May 2020  路  3Comments  路  Source: GothenburgBitFactory/taskwarrior

  • What command(s) did you run?
    task add k枚p mj枚lk proj<TAB>
  • What did you expect to happen?
    The command completes to
    task add k枚p mj枚lk project:

  • What actually happened?
    Nothing

  • Paste the output of the task diag command.

task 2.5.1
Platform: Linux

Compiler
Version: 7.2.0
Caps: +stdc +stdc_hosted +LP64 +c8 +i32 +l64 +vp64 +time_t64
Compliance: C++11

Build Features
CMake: 3.9.5
libuuid: libuuid + uuid_unparse_lower
libgnutls: 3.5.8
Build type: None

Configuration
File: /home/voidcase/.taskrc (found), 1461 bytes, mode 100644
Data: /home/voidcase/Sync/.task (found), dir, mode 40755
Locking: Enabled
GC: Enabled
$EDITOR: /usr/bin/nvim
Server:
Trust: strict
Certificate: , not readable, 0 bytes
Key: , not readable, 0 bytes
Ciphers: NORMAL
Creds:

Hooks
System: Enabled
Location: /home/voidcase/Sync/.task/hooks
(-none-)

Tests
$TERM: xterm-256color (120x30)
Dups: Scanned 43 tasks for duplicate UUIDs:
No duplicates found
Broken ref: Scanned 43 tasks for broken references:
No broken references found

bug reproduced triaged

Most helpful comment

Thanks for the bug report. I suggest to change the title to "does not expand". I interpreted "complete" to mean an infinite loop type of issue.

All 3 comments

Thanks for the bug report. I suggest to change the title to "does not expand". I interpreted "complete" to mean an infinite loop type of issue.

I can confirm the same behavior with the 2.6.0 branch (commit 4b67f10cb1301797e22b0cfe3bb52884af28ca99) and zsh.

I just started having a look at this. If I am not mistaken this is a pure zsh issue. At least for me it works in bash (besides the obvious difference in completion suggestions):

[max@ArchThinkPad taskwarrior]$ ../src/task rc:test.rc add test盲 pr<TAB>
prepend   priority  project   projects

I don't have fish installed so was unable to test its behavior.

However, while looking at what happens under zsh I found the following behavior:

%聽../src/task rc:test.rc add test盲 p<TAB>
completing task attributes
depends      -- Other tasks that this task depends upon
description  -- Task description text
due          -- Due date
end          -- Date task was completed/deleted
entry        -- Date task was created
limit        -- Desired number of rows in report
priority     -- priority
project      -- Project name
recur        -- Recurrence frequency
scheduled    -- Date task is scheduled to start
start        -- Date task was started
status       -- Status of task - pending, completed, deleted, waiting
until        -- Expiration date
wait         -- Date until task becomes pending

Whereas: %聽../src/task rc:test.rc add test盲 pr<TAB> will directly expand to precur:. Thus, it is appears as though the completion is ignoring the first non-whitespace character after an Umlaut (multiple whitespaces between test盲 and p<TAB> behave the same as the above).

The same also happens when using 盲test instead of test盲 so it appears to be a consequence purely of the existence of an umlaut.

And the weirdness continues:
% ../src/task rc:test.rc add 盲test盲 p<TAB> expands to pr (because all options starting with a p here will actually start with pr). But now we are back to completing any attribute. Thus, each umlaut appears to cause one non-whitespace char being ignored.

Interesting is also the case of % ../src/task rc:test.rc add 盲test盲 d<TAB> which triggers the correct popup menu containing depends, description and due (which can also be selected normally and are inserted correctly) but adding another char and hitting TAB again (like in de<TAB>) results in the same erroneous behavior as with the pr<TAB> case.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gour picture gour  路  5Comments

xerus2000 picture xerus2000  路  6Comments

taskwarrior picture taskwarrior  路  4Comments

MartyLake picture MartyLake  路  4Comments

MarcelPa picture MarcelPa  路  3Comments