Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How do I do 'if X is a function, unfunction it' ?
- X-seq: zsh-users 1493
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: Timothy J Luoma <luomat+Lists/Zsh/users@xxxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxxxxxxx
- Subject: Re: How do I do 'if X is a function, unfunction it' ?
- Date: Fri, 1 May 1998 14:15:07 -0700
- In-reply-to: <199805011545.LAA17525@xxxxxxxxxxxxxxx>
- References: <199805011545.LAA17525@xxxxxxxxxxxxxxx>
On May 1, 11:45am, Timothy J Luoma wrote:
> Subject: How do I do 'if X is a function, unfunction it' ?
>
> for example, if the command 'cp' has been previously defined as a function,
> then I want to unfunction it
You mean, without getting a "no such hash table element" warning?
How about
function unfunction() {
for i; do
function $i () { }
builtin unfunction $i
done
}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author