Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh functions not playing nice.



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@xxxxxxxxxxx>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.
>


Messages sorted by: Reverse Date, Date, Thread, Author