From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1021 invoked by alias); 9 May 2018 20:05:38 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 42755 Received: (qmail 1745 invoked by uid 1010); 9 May 2018 20:05:38 -0000 X-Qmail-Scanner-Diagnostics: from mail-oi0-f45.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.218.45):SA:0(-1.9/5.0):. Processed in 1.411193 secs); 09 May 2018 20:05:38 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: sgniazdowski@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=hZkqp5XfA5pEbdPGSdRThMvVqIYGLglL+5PUY4cPmps=; b=ltuJ9ehbGMMF5GjlblCkMdn2oMI6DuiDyHqofrvShaBIZlyrdiw7Ir20G799cxz9v5 HuB0PAphLaTrHB+rYdieJrxLuMYnK8vdZz6u5G8YOv954radBBKNWrp7MoVqtoZJZQc2 ICsG499Pz9SDDGreI5t9II6p/rgE+ifY/UoK/851N+ISv7MaOd6EyorgR5GXqvtQRzF/ FWaX5eKXcUEvKJSd5sFGY1l+kpvnlqiLhYNOQ89oonQaaEVYvkzzIZElsCF4Sy2x+XEh /QE85Gtj+LTmu7p5lA+SXdm0XwJgPkhwEF14TGJ1z/an+rfr4TlXBKIMU8vjD42A5A6C Z8XA== X-Gm-Message-State: ALQs6tAAtge+RSYhEICZDvv66CNegM7CMepeBIl6t50PF2HvDChKhyZH cNqJLwH9zPPG6wVBLxJx11tMs0rNYD6BmAxE4zs= X-Google-Smtp-Source: AB8JxZq3V02Qyoc81Xaj6qNkIbz071SLjJT/ptSDQ7CaxzBVOT0u2JWK6vPm0UZ/jr1S7ni+e6zdhAyOh7f14EMcYfw= X-Received: by 2002:aca:39d6:: with SMTP id g205-v6mr30801828oia.145.1525896333743; Wed, 09 May 2018 13:05:33 -0700 (PDT) MIME-Version: 1.0 From: Sebastian Gniazdowski Date: Wed, 9 May 2018 22:05:13 +0200 Message-ID: Subject: Any ideas for syntax of a task specification? To: Zsh hackers list Content-Type: multipart/alternative; boundary="000000000000efddb2056bcb6cb9" --000000000000efddb2056bcb6cb9 Content-Type: text/plain; charset="UTF-8" Hello, 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 'load'" 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. -- Best regards, Sebastian Gniazdowski --000000000000efddb2056bcb6cb9--