Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Announce of Zsh Navigation Tools
- X-seq: zsh-users 20543
- From: ZyX <kp-pav@xxxxxxxxx>
- To: Ray Andrews <rayandrews@xxxxxxxxxxx>, "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
- Subject: Re: Announce of Zsh Navigation Tools
- Date: Sat, 12 Sep 2015 22:41:08 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1442086869; bh=f4r57RogiCRVtxATN7lXh2dBp+QMLA/pTHY6dIBR5Ds=; h=From:To:In-Reply-To:References:Subject:Date; b=gvkflgXFBxBaXnfLOOZGMyhOPOhahPZmYPEIlPtRcuQ8cBLuUZzAyd/iHyk39LuZx xzNWV09WIjeaMik5jNAyei2c3lPs6HdO4RJKvRl6B/eQIc2VbhiJo4WJGROpJJ93Ed 09x7I9ewarUK0c+RX16FUi03AYKkFZjW6M2sRQ7c=
- In-reply-to: <55F465E6.1040405@eastlink.ca>
- 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: <CAKc7PVCFRY-e+KvHzYK-VFFeRhRWL+HPWThYSJsTtZr6L3CT-Q@mail.gmail.com> <55F465E6.1040405@eastlink.ca>
12.09.2015, 21:21, "Ray Andrews" <rayandrews@xxxxxxxxxxx>:
> On 09/08/2015 05:32 AM, Sebastian Gniazdowski wrote:
>> Hello,
>> I would like to announce Zsh Navigation Tools,
>
> ...
>
> Thanks for those Sebastian, I'm playing with them now, several look very
> useful. One thing, I had to create
> '/usr/local/share/zsh/site-functions'. I wonder if there is a location
> for the files that is in keeping with my directory structure. A trivial
> point: in the files, you call them 'functions' whereas they are scrips,
> I believe. However, I'm tempted to convert them to functions anyway.
They will work if located in *any* directory listed in $fpath. And they *are* functions, you need to read about autoload functions in man zshmisc, section AUTOLOADING FUNCTIONS:
If the KSH_AUTOLOAD option is set, or the file contains only a simple definition of the function, the file's contents will be executed. This will normally define the function in question, but may also per‐
form initialization, which is executed in the context of the function execution, and may therefore define local parameters. It is an error if the function is not defined by loading the file.
Otherwise, the function body (with no surrounding `funcname() {...}') is taken to be the complete contents of the file. This form allows the file to be used directly as an executable shell script. If pro‐
cessing of the file results in the function being re-defined, the function itself is not re-executed. To force the shell to perform initialization and then call the function defined, the file should contain
initialization code (which will be executed then discarded) in addition to a complete function definition (which will be retained for subsequent calls to the function), and a call to the shell function,
including any arguments, at the end.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author