zsh-users
 help / color / mirror / code / Atom feed
* How do I go about finding reason for slow tab completion with taskwarrior "task" command?
@ 2023-07-08 15:56 Steve Dondley
  2023-07-08 16:55 ` Steve Dondley
  2023-07-08 17:12 ` Lawrence Velázquez
  0 siblings, 2 replies; 3+ messages in thread
From: Steve Dondley @ 2023-07-08 15:56 UTC (permalink / raw)
  To: zsh-users

I’m using taskwarrior on latest version of Debian stable (bookworm).

It takes about 2 seconds for its “task” command to respond to tab completion, making it no better than typing things in directly for most commands.

Git completion works well with very little delay. So I have to assume it’s something related to taskwarrior.

The completion script can be found here: https://github.com/GothenburgBitFactory/taskwarrior/blob/develop/scripts/zsh/_task and I can see it on my machine at /usr/share/zsh/site-functions/_task

What’s a good method for determine what is slowing things down? I was thinking about commenting out various part of the script through trial and error. But if I rename the _task file and start a new zsh process, completion still works. So I’m not sure how to get that _task script reloaded easily.

Can someone head me in the right direction?  









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

* Re: How do I go about finding reason for slow tab completion with taskwarrior "task" command?
  2023-07-08 15:56 How do I go about finding reason for slow tab completion with taskwarrior "task" command? Steve Dondley
@ 2023-07-08 16:55 ` Steve Dondley
  2023-07-08 17:12 ` Lawrence Velázquez
  1 sibling, 0 replies; 3+ messages in thread
From: Steve Dondley @ 2023-07-08 16:55 UTC (permalink / raw)
  To: zsh-users

The problem had to do with a custom hook I wrote for taskwarrior. Not sure why the hook is getting fired but it has nothing to do with zsh.

But I’m still curious to know where the actual _task completion script is. How do I find the actual completion script for task command?



> On Jul 8, 2023, at 11:56 AM, Steve Dondley <s@dondley.com> wrote:
> 
> I’m using taskwarrior on latest version of Debian stable (bookworm).
> 
> It takes about 2 seconds for its “task” command to respond to tab completion, making it no better than typing things in directly for most commands.
> 
> Git completion works well with very little delay. So I have to assume it’s something related to taskwarrior.
> 
> The completion script can be found here: https://github.com/GothenburgBitFactory/taskwarrior/blob/develop/scripts/zsh/_task and I can see it on my machine at /usr/share/zsh/site-functions/_task
> 
> What’s a good method for determine what is slowing things down? I was thinking about commenting out various part of the script through trial and error. But if I rename the _task file and start a new zsh process, completion still works. So I’m not sure how to get that _task script reloaded easily.
> 
> Can someone head me in the right direction?  
> 
> 
> 
> 
> 
> 
> 
> 



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

* Re: How do I go about finding reason for slow tab completion with taskwarrior "task" command?
  2023-07-08 15:56 How do I go about finding reason for slow tab completion with taskwarrior "task" command? Steve Dondley
  2023-07-08 16:55 ` Steve Dondley
@ 2023-07-08 17:12 ` Lawrence Velázquez
  1 sibling, 0 replies; 3+ messages in thread
From: Lawrence Velázquez @ 2023-07-08 17:12 UTC (permalink / raw)
  To: Steve Dondley; +Cc: zsh-users

On Sat, Jul 8, 2023, at 11:56 AM, Steve Dondley wrote:
> What’s a good method for determine what is slowing things down? I was 
> thinking about commenting out various part of the script through trial 
> and error. But if I rename the _task file and start a new zsh process, 
> completion still works.

What matters is not the filename but the #compdef line at the
beginning of the file.

https://zsh.sourceforge.io/Doc/Release/Completion-System.html#Autoloaded-files

-- 
vq


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

end of thread, other threads:[~2023-07-08 17:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-08 15:56 How do I go about finding reason for slow tab completion with taskwarrior "task" command? Steve Dondley
2023-07-08 16:55 ` Steve Dondley
2023-07-08 17:12 ` Lawrence Velázquez

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).