Prezto: command not found: async_flush_jobs & async_job

Created on 18 Aug 2017  ·  9Comments  ·  Source: sorin-ionescu/prezto

Description

Using prompt sorin, I always get:

prompt_sorin_precmd:8: command not found: async_flush_jobs
prompt_sorin_precmd:27: command not found: async_job

Expected behavior

no such message expected

Versions

  • Prezto commit: HEAD
  • ZSH version:
  • OS information: Linux

Most helpful comment

What's the output of wc -l ~/.zprezto/modules/prompt/functions/async?

If the above command says something like wc: modules/prompt/functions/async: No such file or directory please make sure the modules/prompt/external/async dir is properly initialized (though I assumed the git submodule commands I gave you above would do that).

I've been playing around and the only time I've been seeing similar issues is when the ~/.zprezto/modules/external/async isn't actually initialized.

EDIT: Take this with a grain of salt, but I've seen this command mentioned with regards to new submodules not being managed by git properly: git submodule update --init --force --remote I assume it will blow away any submodule changes you have, so be careful using it... really anything where --force is an argument. :P

All 9 comments

Have you made sure your submodules are up to date?

git submodule sync && git submodule update --init

zsh-async was moved to a separate external dependency rather than relying on the one in the pure prompt.

Yes: ~/.zprezto ❯❯❯ git submodule sync && git submodule update --init
Synchronizing submodule url for 'modules/autosuggestions/external'
Synchronizing submodule url for 'modules/completion/external'
Synchronizing submodule url for 'modules/fasd/external'
Synchronizing submodule url for 'modules/history-substring-search/external'
Synchronizing submodule url for 'modules/prompt/external/agnoster'
Synchronizing submodule url for 'modules/prompt/external/async'
Synchronizing submodule url for 'modules/prompt/external/powerline'
Synchronizing submodule url for 'modules/prompt/external/pure'
Synchronizing submodule url for 'modules/syntax-highlighting/external'
prompt_sorin_precmd:8: command not found: async_flush_jobs
prompt_sorin_precmd:27: command not found: async_job
~/.zprezto ❯❯❯

I opened a new terminal and still get the same error message.

What is the output of ls -l ~/.zprezto/modules/prompt/functions/async

That should be pointing to ../external/async/something. If it's still pointing to pure, you can try manually removing that file and checking it out again.

I don't know why but there have been a few reports of this happening during upgrades and I haven't been able to pin it down yet.

~/.zprezto ❯❯❯ ls -l ~/.zprezto/modules/prompt/functions/async
lrwxrwxrwx 1 nfm eng 27 Aug 17 16:13 /usr/local/google/home/nfm/.zprezto/modules/prompt/functions/async -> ../external/async/async.zsh
prompt_sorin_precmd:8: command not found: async_flush_jobs
prompt_sorin_precmd:27: command not found: async_job

Seems it points to async already

What happens if you run

prompt agnoster && prompt sorin

To force that prompt to reload?

Still does not work:

~/.zprezto ❯❯❯ prompt agnoster && prompt sorin
prompt_sorin_setup:9: async: function definition file not found
prompt_sorin_setup:43: command not found: async_start_worker
prompt_sorin_setup:44: command not found: async_register_callback
prompt_sorin_precmd:8: command not found: async_flush_jobs
prompt_sorin_precmd:27: command not found: async_job
~/.zprezto ❯❯❯

What's the output of wc -l ~/.zprezto/modules/prompt/functions/async?

If the above command says something like wc: modules/prompt/functions/async: No such file or directory please make sure the modules/prompt/external/async dir is properly initialized (though I assumed the git submodule commands I gave you above would do that).

I've been playing around and the only time I've been seeing similar issues is when the ~/.zprezto/modules/external/async isn't actually initialized.

EDIT: Take this with a grain of salt, but I've seen this command mentioned with regards to new submodules not being managed by git properly: git submodule update --init --force --remote I assume it will blow away any submodule changes you have, so be careful using it... really anything where --force is an argument. :P

Wow... this is actually the fix! I just realized that the async folder is actually empty despite all the message: "Synchronizing submodule url for 'modules/prompt/external/async'" I saw before.

Thanks a lot for the help!

Glad you got it fixed. Sorry it took a bit of back and forth to get it figured out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

entertvl picture entertvl  ·  3Comments

gdetrez picture gdetrez  ·  5Comments

adrian-amaglio picture adrian-amaglio  ·  5Comments

ww7 picture ww7  ·  4Comments

mischaboldy picture mischaboldy  ·  3Comments