Zsh Mailing List Archive
Messages sorted by:
Any ideas for syntax of a task specification?
- X-seq: zsh-workers 42755
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Any ideas for syntax of a task specification?
- Date: Wed, 9 May 2018 22:05:13 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=hZkqp5XfA5pEbdPGSdRThMvVqIYGLglL+5PUY4cPmps=; b=qYBSOG4E7Ml3xikXJJXYTBaEMrV5DYLd1lyt0VjL49vqLCSvAtn2jOFPzPc7u4GnOG UiXKQx3A4AUwH/VC2TVKcOWGnJYv89LkWjZ1ranyKhK8SKv4jjWavNV+0zAos4gJQRW4 Uc4xUX5pHLwHo2/OT92CJMIlZrLCUlAbJJTXDXkim/LdJLZ/gNmMTkCe3DRTkzUxKPgW l7FyZ5nAS0menjtq1+6K6iT7zbpQQhNBfYFvmcvacrMYGdPKgTQ2iSZdmn4XFmVbX72y IaHMy6fenxo5CQywtgrOOi0BJ9KFqpraiWlAcOHGR7P8P3RaKPQLRzMoEennYGg4ltyg A0Pg==
- List-help: <mailto:email@example.com>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- List-unsubscribe: <mailto:email@example.com>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
I currently use following syntax of a task (the task is: file to source):
... atinit"code to be run before running task" \
atload"code to be run after running task" \
load"condition to load task, e.g. [[ $PROMPT = yes ]]" \
unload"condition to unload task, e.g. [[ $PROMPT = no ]]"
wait"time to wait before loading task, # of seconds, alternative to
Background & motivation is: 1-code-line with substitution is sufficient to
detect task that needs to be run. The substitution uses code execution,
calls math function.
It's task-management, elastic scheduler, in few lines of code, fast.
So I wonder: has anyone seen in e.g. daily job, in some other technology, a
syntax to specify complex things, tasks, that could be used? Or has some
idea? Zsh can serialize hashes, so ZSH_TASKS array (on which the
1-code-line substitution operates) can hold very rich task specification.
Messages sorted by: