Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Is it possible to find the location of a function definition?
- X-seq: zsh-users 20099
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Hao Wu <echowuhao@xxxxxxxxx>
- Subject: Re: Is it possible to find the location of a function definition?
- Date: Mon, 6 Apr 2015 06:57:38 +0200
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=TeN7IdQAjYnuaM9gCdznWDuVnC+EVOEMRSKJM6I4y7k=; b=dIKfzzc/8Xxx+wQUDl+8Sa011nq/TZ5NOliph7U3lFhVxduZaT4dQ+zx0c+kJsrRf/ CQPWB2TXDyuDhOwBpYcEh+zknshjoRa/ndO5/L7OoDaw5OIQPDXgsTr7kEgI80MXsBIM htBQURX0qLT4A9cEHHu/5N9cxDkjofNNxK5A8rYb8ZFX/tK4ZilZtzelY7xlcBLoi5GX X5/wNByQhmqtc+d999c7X9l7EfMimPBfdqQYruGqKc+C4LMKv/vQekZMH3tsugj/tbHP l9MlMmyLPJxSPI/j2SrgI9QDt/RrB4w2Qys4bcLx/EaxC2wZLQM/fBaAq1UD5sThNBAw k9gg==
- In-reply-to: <CAGfENy_hFQro9greE7-DRXOw3UQG7Qkp6RPbnkpJFq39Den_5A@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAGfENy_hFQro9greE7-DRXOw3UQG7Qkp6RPbnkpJFq39Den_5A@mail.gmail.com>
On Mon, Apr 6, 2015 at 6:23 AM, Hao Wu <echowuhao@xxxxxxxxx> wrote:
> Hi,
>
> Is it possible to find the location of a function definition without going
> over all the files.?
>
> I get a function override the default one, which is quite annoying. I want
> to find location of the definition.
>
> http://stackoverflow.com/questions/11627324/zsh-search-for-function-definition
One way you could do it is look at the definition of the function,
which thefunc, and override one of the commands it calls with a
function that prints $funcfiletrace,
echo() { builtin echo $funcfiletrace; builtin echo "$@" } (don't do
this globally of course, just in an interactive shell)
another way is to apply this patch:
http://git.mikachu.zsh.jp/commit/?h=mika&id=225140c2aa029c9f19615c5894c4813a88afca49
and then run whence -F thefunc
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author