bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Functions that update themselves


From: konsolebox
Subject: Functions that update themselves
Date: Mon, 3 Jun 2019 15:54:59 +0800

Hi Chet,

Do you explicitly allow functions to do this?  I just want to know.

a() { a() { ...; }; a; }
b() { unset -f b; command b "$@"; }

My current use case for this is to have a function simplify itself
when condition checks are no longer necessary and just adds
unnecessary runtime load.  I also had many other previous ones.

-- 
konsolebox



reply via email to

[Prev in Thread] Current Thread [Next in Thread]