zsh-async

Because your terminal should be able to perform tasks asynchronously without external tools!

MIT License

Downloads
410
Stars
765
Committers
10

Bot releases are visible (Hide)

zsh-async - v1.8.6 Latest Release

Published by mafredri almost 2 years ago

  • Use a regular space instead of non-breaking (#55) 3ba6e2d
  • Clarify functions for jobs must be defined when worker is started (#53) a61239d
  • Add build badge to README 0f3b27b
  • Switch to GitHub Actions (#46) 65c0885
  • Fix two more instances of cat 1e41772
  • Ensure we are using the real cat (#47) c18959a

https://github.com/mafredri/zsh-async/compare/v1.8.5...v1.8.6

zsh-async - v1.8.5

Published by mafredri about 4 years ago

  • Fix async_start_worker on zsh 5.0.2 and below e3550a3

https://github.com/mafredri/zsh-async/compare/v1.8.4...v1.8.5

zsh-async - v1.8.4

Published by mafredri about 4 years ago

  • Fix async_start_worker when noclobber is set c7f35ec

https://github.com/mafredri/zsh-async/compare/v1.8.3...v1.8.4

zsh-async - 1.8.3

Published by mafredri over 4 years ago

Changes

  • Avoid warning when WARN_CREATE_GLOBAL is active (#41) (fa948266caf4efaa903d49b86e1a938e8d50ecc4)
  • Close fd on error condition (72c965ffc8612f350446b05c85ca6eba2758391e)
zsh-async - 1.8.1

Published by mafredri over 4 years ago

Changes

  • Workaround for main shell stderr being reassigned to /dev/null (8ce4ed6a4cd5432d3603b8522782d112489d92d1)
zsh-async - 1.8.0

Published by mafredri over 4 years ago

Changes

Since 1.7.2

  • Only set ZLE watcher after a callback has been registered (317d19ea817595e283370db5781f3d7a002b92a5)
  • Improve worker startup procedure in async_start_worker (#39) (361dc171e65c82f57ad814ebecea91c98a6d4b68)
  • Improved error state handling (#37) (32548d3c3f1361de57f09ab9293c902b78f49b55)

Since 1.7.1

  • travis: Fix building of zsh 5.0.2 and 5.0.8 (#32) (98d32afcce8e328be86f381c529e951943e57d19)
  • Prevent infinite loop in case of broken zpty file descriptor (#31) (43de5e0738eaf366dfde4d0a204de655de16f18b)
  • travis: Switch to using .tar.xz since .tar.gz is unavailable (e6d937228729f934f2033039bb54c3a18f5f1358)

Since 1.7.0

  • Ensure coproc spawned by async_worker_eval is closed (847a9d81dc6748750ac68508ecb9f71ca31d5028)
  • travis: Test on zsh 5.6.2 (14f9ac8224fd5a81740758a317f58faf5ae9020c)

https://github.com/mafredri/zsh-async/compare/v1.7.0...v1.8.0

zsh-async - 1.7.0

Published by mafredri about 6 years ago

Changes

  • New: Introduce async_worker_eval for updating the worker environment (#29)
    • For example, async_worker_eval my_worker cd $PWD, would change the current working directory inside the worker, which would also be inherited by subsequent jobs
    • Can be used as an alternative to passing $PWD to every async job
  • Fix: Prefix async job output to prevent external corruption (#28)
    • This also fixes some cases of invalid arguments being passed to the callback when the output buffer becomes corrupt

https://github.com/mafredri/zsh-async/compare/v1.6.2...v1.7.0

zsh-async - 1.6.2

Published by mafredri about 6 years ago

It's been a while since I wrote release notes for zsh-async, I think it's about time.

Changes from v1.5.2 to v1.6.2

  • Avoid creation of implcit global variables
  • Add 6th parameter when invoking callback functions, has next, indicates that callback will be invoked again within this event loop
  • Replace async.plugin.zsh symlink with source for better compatibility
  • Add ASYNC_VERSION environment variable
  • Avoid array quoting on error states in async_process_results

https://github.com/mafredri/zsh-async/compare/v1.5.1...v1.6.2

zsh-async - 1.5.1

Published by mafredri over 7 years ago

Changes

  • Fix problem in async_job when RC_EXPAND_PARAM was set (#15), thanks @derimagia
zsh-async - 1.5.0 consequential-canary

Published by mafredri almost 8 years ago

Changes

  • ZLE watchers are now used on all versions of zsh (the SIGWINCH kill signal is no longer needed to notify when a job is complete)
    • Tested to work on at least zsh versions: 5.0.2, 5.0.8 and 5.1.1
  • Small improvements to async_flush_jobs (via _killjobs)

Full changelog: https://github.com/mafredri/zsh-async/compare/v1.4.0...v1.5.0

zsh-async - 1.4.0 bulletproof-badger

Published by mafredri almost 8 years ago

New features and improvements

  • Automated test suite!
    • Travis now runs tests for zsh versions: 5.3.1, 5.3, 5.2, 5.1.1, 5.0.8 and 5.0.2
  • Now works with debugging (setopt xtrace or zsh -x) enabled
  • Jobs (via async_job) are now allowed to output NULL-characters ($'\0')
  • Stdout and stderr from jobs are now use a higher lever of quoting instead of relying on typeset -p quoting (which is insufficient)
  • More advanced commands can now be sent to async_job
  • Killing jobs (via async_flush_jobs) should now be more reliable (previously it did not properly terminate jobs on some systems)

Bugfixes

  • The async worker no longer dies if a newer async worker (or zpty instance) is stopped
  • Error output (stderr) in the worker is now discarded to avoid interfering with job output
  • async_process_results could, in edge cases, discard an incomplete message from $ASYNC_PROCESS_BUFFER[$worker], it was rewritten to avoid this

Full changelog: https://github.com/mafredri/zsh-async/compare/v1.3.1...v1.4.0

zsh-async - 1.3.1

Published by mafredri almost 8 years ago

Changelog

  • Bugfix: Remove incorrect word split on the items array in async_process_results when invoking the callback. For some reason this has worked on older versions of zsh, but is broken in 5.2-dev.
  • Avoid inheriting zsh hooks inside async worker

Full changelog: https://github.com/mafredri/zsh-async/compare/v1.3.0...v1.3.1

zsh-async - 1.2.0

Published by mafredri about 8 years ago

Changelog

  • Avoid non-zero exit status when called internally (627f8db861a9144a8f7c04d561bd5ea1dd776468, #5)
  • Avoid leaking $line and $IFS into callback handler from async_process_results (43e3d4eb89ec5b8533e43a31e63e675c2816e9dd, c32a5c6dcc9f1adacdb6af2e14983a8d5cfe2185, #6)
  • Comments and typo fixes

Full changelog: https://github.com/mafredri/zsh-async/compare/v1.1.0...v1.2.0

zsh-async - 1.3.0

Published by mafredri about 8 years ago

Changelog

  • Close coproc when async worker is idle (prevent long-running cat process)
  • Improve passing parameters between async_job and async worker to avoid losing whitespace and newlines (df61b12491e37a02647431438850a37ec7f63b4f, #8)

Full changelog: https://github.com/mafredri/zsh-async/compare/v1.2.0...v1.3.0

zsh-async - v1.1.0 gotta-kill-'em-(all)!

Published by mafredri almost 9 years ago

This release brings proper support for flushing jobs and leverages ZLE watchers for notifying (instead of kill signals) on zsh versions >=5.1.

Changelog

  • Previously async_flush_jobs only killed the immediate child running inside a worker. If something else was executed by that child, it would continue running until completion. This was changed to instead send a TERM-signal to the entire process group thus allowing all task to exit gracefully.
  • ZLE watcher replaces the kill -WINCH method of notifying when a job is complete whenever it is available (done through feature detection). Since zsh 5.1 zpty workers return the fd that was created for them and because of that we can attach a ZLE watcher to the fd that is triggered on output.
  • Fixed an issue where async notify didn't work if setopt localtraps was set.
  • Code cleanup

Full changelog: https://github.com/mafredri/zsh-async/compare/v1.0.0...v1.1.0

zsh-async - v1.0.0 separation-of-stds

Published by mafredri over 9 years ago

Biggest feature in this release is the separation of stdout and stderr, introducing a new fifth parameter $5 (for stderr).

Other:

  • Null $'\0' characters are now stripped from the output
  • Bugfixes
  • Improvements

Changes: https://github.com/mafredri/zsh-async/compare/v0.2.3...v1.0.0

zsh-async - v0.2.3 killer-of-async

Published by mafredri over 9 years ago

  • Make sure the flushed jobs really die with kill -KILL (-9).
  • Small fix for flushing jobs on older zsh versions (4.x)
zsh-async - v0.2.2

Published by mafredri over 9 years ago

  • Fixed a bug where async_flush_worker failed to detect any workers and did not clear current jobs
  • async_job no longer requires a function for more complicated expressions, you can now use it like so: async_job <worker> 'sleep 1 && echo "very async"
  • Other minor improvements to prevent potential globbing