Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: read-only functions
- X-seq: zsh-workers 37872
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: read-only functions
- Date: Tue, 2 Feb 2016 17:32:00 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=aNoynNuVPcCPG51TQW9P9C0UFquNTSAiWdaczxPuVn8=; b=IeHzlwcRoUjwx5IyGyFiRspIpVmVejrnePk2MaXwJcQJ0yhx12x38JmhvWJSn6G2aG ulK9sfrWHyrROjUxV+UuD71com3ypRZdd84oLkPmBQs4arI/m8oxFxFRslK+85jYIinU hItFwW/yfq5lD6QFsaQ4RZ+Nk31VjwuGWzQ8XkIQb5oIJUoNE600H0CwZMwKqElB+cPF wcsrz3eG2knxXsHrYyh9Wb7N5oKIaNU5Cm/zhQcP0kQ7NUhBvLKwPu/MpVvDAhJYiJCv 0KP1hsbrz8C357W7INJ76IgCz8jfa2hTChSPqK1LXni8fiVKJGWcY89zxqFrkfhCAn91 FhHw==
- In-reply-to: <56B1483C.500@inlv.org>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <56B1483C.500@inlv.org>
On Feb 3, 12:22am, Martijn Dekker wrote:
} Subject: read-only functions
}
} bash and yash have read-only functions using:
}
} readonly -f function_name
}
} Could this be a feature worth adding to zsh?
}
} TIA,
}
} - M.
}-- End of excerpt from Martijn Dekker
On Feb 3, 12:22am, Martijn Dekker wrote:
}
} readonly -f function_name
}
} Could this be a feature worth adding to zsh?
Related question: Given that presently it doesn't mean that, why does
reaonly even accept the -f option? All it does is the wrong thing,
i.e., makes "readonly -f" behave like "functions" (it should at least
behave like "functions -r" which is currently an error).
Obviously typeset -r accepts -f because both -r and -f independently do
mean something and in general we haven't rigorously coded for mutually
exclusive options.
Anyway there doesn't seem to be any particular obstacle to applying
the PM_READONLY flag to shfunc nodes.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author