zsh-users
 help / color / mirror / code / Atom feed
From: Russell Harmon <russ@eatnumber1.com>
To: Ray Andrews <rayandrews@eastlink.ca>
Cc: zsh-users@zsh.org
Subject: Re: zsh functions not playing nice.
Date: Sat, 19 Jan 2013 12:51:02 -0500	[thread overview]
Message-ID: <CA+zrezQg7Q0k6ajctc3ac7myY0TxJNW36vVHRU7+5Y9qONZmkw@mail.gmail.com> (raw)
In-Reply-To: <50FAD0AF.60506@eastlink.ca>

[-- Attachment #1: Type: text/plain, Size: 753 bytes --]

Unfortunately, this is not possible.

nice can only work on a per-process granularity, as it sets attributes of
the affected process. Builtins and functions are run within the existing
ZSH process.

Scripts and binaries however, if run outside the existing ZSH process (e.g.
not using the "source" builtin), can be niced, and should just work the way
you wrote.
--
Russell Harmon


On Sat, Jan 19, 2013 at 11:58 AM, Ray Andrews <rayandrews@eastlink.ca>wrote:

> Gentlemen,
>
> I can't get this sort of thing to work:
>
>     $ nice -n 20 some-zsh-function
>
> returns:
>
>    "nice: some-zsh-function: No such file or directory.
>
> I can use 'nice' with any builtin or binary or script, just not with a
> function.
> How do I solve that?
>
> Thanks.
>

      parent reply	other threads:[~2013-01-19 17:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-19 16:58 Ray Andrews
2013-01-19 17:38 ` Stephane Chazelas
2013-01-19 18:53   ` Ray Andrews
2013-01-19 17:51 ` Russell Harmon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+zrezQg7Q0k6ajctc3ac7myY0TxJNW36vVHRU7+5Y9qONZmkw@mail.gmail.com \
    --to=russ@eatnumber1.com \
    --cc=rayandrews@eastlink.ca \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).