zsh-users
 help / color / mirror / code / Atom feed
* Colon in alias appears to be breaking task compltion
@ 2021-09-05 16:02 Steve Dondley
  2021-09-05 17:16 ` Steve Dondley
  0 siblings, 1 reply; 7+ messages in thread
From: Steve Dondley @ 2021-09-05 16:02 UTC (permalink / raw)
  To: Zsh users

My alias A for taskwarrior:
alias taa='task +st +sn add'

My alias B for taskwarrior:
alias tai="task +imm +st due:1h add"

Alias A works fine with tab completion. "taa proj<tab>" completes the 
word "project" as expected.

Alias B does not work: with "tai proj<tab>" there is no tab completion 
for the word "project".

I can get alias B to work if I remove the "due:1h" bit from the right 
hand side of Alias B. So it appears the colon is causing issues.

Workaround?


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Colon in alias appears to be breaking task compltion
  2021-09-05 16:02 Colon in alias appears to be breaking task compltion Steve Dondley
@ 2021-09-05 17:16 ` Steve Dondley
  2021-09-05 17:27   ` Bart Schaefer
  0 siblings, 1 reply; 7+ messages in thread
From: Steve Dondley @ 2021-09-05 17:16 UTC (permalink / raw)
  To: Zsh users

On 2021-09-05 12:02 PM, Steve Dondley wrote:
> My alias A for taskwarrior:
> alias taa='task +st +sn add'
> 
> My alias B for taskwarrior:
> alias tai="task +imm +st due:1h add"
> 
> Alias A works fine with tab completion. "taa proj<tab>" completes the
> word "project" as expected.
> 
> Alias B does not work: with "tai proj<tab>" there is no tab completion
> for the word "project".
> 
> I can get alias B to work if I remove the "due:1h" bit from the right
> hand side of Alias B. So it appears the colon is causing issues.
> 
> Workaround?

The problem is occurring even without using an alias.

This does not autocomplete:

task add due:1h project:To<tab>

It does, however, work just find in bash.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Colon in alias appears to be breaking task compltion
  2021-09-05 17:16 ` Steve Dondley
@ 2021-09-05 17:27   ` Bart Schaefer
  2021-09-05 17:43     ` Bart Schaefer
                       ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Bart Schaefer @ 2021-09-05 17:27 UTC (permalink / raw)
  To: Steve Dondley; +Cc: Zsh users

On Sun, Sep 5, 2021 at 10:16 AM Steve Dondley <s@dondley.com> wrote:
>
> This does not autocomplete:
>
> task add due:1h project:To<tab>

Where did you get the completion definition for "task"?  There is none
in the zsh distribution.

> It does, however, work just find in bash.

That's to a large extent irrelevant as the two systems work quite differently.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Colon in alias appears to be breaking task compltion
  2021-09-05 17:27   ` Bart Schaefer
@ 2021-09-05 17:43     ` Bart Schaefer
  2021-09-05 17:59       ` Steve Dondley
  2021-09-05 17:48     ` Bart Schaefer
  2021-09-05 18:03     ` Steve Dondley
  2 siblings, 1 reply; 7+ messages in thread
From: Bart Schaefer @ 2021-09-05 17:43 UTC (permalink / raw)
  To: Steve Dondley; +Cc: Zsh users

On Sun, Sep 5, 2021 at 10:27 AM Bart Schaefer <schaefer@brasslantern.com> wrote:
>
> On Sun, Sep 5, 2021 at 10:16 AM Steve Dondley <s@dondley.com> wrote:
> >
> > This does not autocomplete:
> >
> > task add due:1h project:To<tab>
>
> Where did you get the completion definition for "task"?

I found the one in the OMZ git.  The problem isn't the colon, it's
that "h" is not defined as a valid abbreviation for "hours".

% task add due:1hrs pro<TAB>

completes just fine.  You'll need to report this to the OMZ project.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Colon in alias appears to be breaking task compltion
  2021-09-05 17:27   ` Bart Schaefer
  2021-09-05 17:43     ` Bart Schaefer
@ 2021-09-05 17:48     ` Bart Schaefer
  2021-09-05 18:03     ` Steve Dondley
  2 siblings, 0 replies; 7+ messages in thread
From: Bart Schaefer @ 2021-09-05 17:48 UTC (permalink / raw)
  To: Steve Dondley; +Cc: Zsh users

On Sun, Sep 5, 2021 at 10:27 AM Bart Schaefer <schaefer@brasslantern.com> wrote:
>
> On Sun, Sep 5, 2021 at 10:16 AM Steve Dondley <s@dondley.com> wrote:
> > It does, however, work just find in bash.
>
> That's to a large extent irrelevant as the two systems work quite differently.

In particular, the bash completion is probably looking only at the
single word after which TAB was pressed, whereas the OMZ completion
has been written to syntax check the entire context using the
_regex_arguments mechanism.

% task add due:1h<TAB>

completes to

% task add due:1hrs

Conversely,

% task add due:1h pro<TAB>
parse failed before current word


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Colon in alias appears to be breaking task compltion
  2021-09-05 17:43     ` Bart Schaefer
@ 2021-09-05 17:59       ` Steve Dondley
  0 siblings, 0 replies; 7+ messages in thread
From: Steve Dondley @ 2021-09-05 17:59 UTC (permalink / raw)
  To: zsh-users

On 2021-09-05 01:43 PM, Bart Schaefer wrote:
> On Sun, Sep 5, 2021 at 10:27 AM Bart Schaefer 
> <schaefer@brasslantern.com> wrote:
>> 
>> On Sun, Sep 5, 2021 at 10:16 AM Steve Dondley <s@dondley.com> wrote:
>> >
>> > This does not autocomplete:
>> >
>> > task add due:1h project:To<tab>
>> 
>> Where did you get the completion definition for "task"?
> 
> I found the one in the OMZ git.  The problem isn't the colon, it's
> that "h" is not defined as a valid abbreviation for "hours".
> 
> % task add due:1hrs pro<TAB>
> 
> completes just fine.  You'll need to report this to the OMZ project.

Yes, sir, just discovered the root cause of problem myself and came here 
to report it.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Colon in alias appears to be breaking task compltion
  2021-09-05 17:27   ` Bart Schaefer
  2021-09-05 17:43     ` Bart Schaefer
  2021-09-05 17:48     ` Bart Schaefer
@ 2021-09-05 18:03     ` Steve Dondley
  2 siblings, 0 replies; 7+ messages in thread
From: Steve Dondley @ 2021-09-05 18:03 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: Zsh users

On 2021-09-05 01:27 PM, Bart Schaefer wrote:
> On Sun, Sep 5, 2021 at 10:16 AM Steve Dondley <s@dondley.com> wrote:
>> 
>> This does not autocomplete:
>> 
>> task add due:1h project:To<tab>
> 
> Where did you get the completion definition for "task"?  There is none
> in the zsh distribution.

I'm not even sure how the completion got working to begin with, to be 
honest. I had a bunch of taskwarrior aliases in bash and I simply copied 
them over to zsh. They just all seemed to work out of the box so I 
didn't ask any questions.

It wasn't until about 1/2 hour ago that I found out about the ohmyzh 
taskwarrior plugin which I enabled in an attempt to try to fix my 
problem.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-09-05 18:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-05 16:02 Colon in alias appears to be breaking task compltion Steve Dondley
2021-09-05 17:16 ` Steve Dondley
2021-09-05 17:27   ` Bart Schaefer
2021-09-05 17:43     ` Bart Schaefer
2021-09-05 17:59       ` Steve Dondley
2021-09-05 17:48     ` Bart Schaefer
2021-09-05 18:03     ` Steve Dondley

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).