From: Sweth Chandramouli <sweth@astaroth.nit.gwu.edu>
To: zsh-users@sunsite.auc.dk
Subject: Re: setopt and alias questions
Date: Mon, 8 Feb 1999 14:15:34 -0500 [thread overview]
Message-ID: <19990208141534.A4151@astaroth.nit.gwu.edu> (raw)
In-Reply-To: <990208104550.ZM14297@candle.brasslantern.com>
On Mon, Feb 08, 1999 at 10:45:50AM -0800, Bart Schaefer wrote:
> } > } aside from global aliases, is there any reason
> } > } to not put all of my aliases into equivalent functions?
> } >
> } > Probably not. (Functions aren't exported either, though.)
> } no, but they can be dropped in a .zfunc folder, so that
> } only an autoload loop needs to be put in .zshrc for all shells to
> } have access to them.
>
> You don't even need a loop.
>
> autoload $^fpath/*(.:t)
i don't like error messages, however, so i use the loop to test
for the existance of autoloadable files before doing the actual autoload:
for DIRNAME in ${fpath} ; do
if [[ -x ${DIRNAME}/*(.x:t) ]] ; then
autoload ${DIRNAME}/*(.x:t)
fi;
done;
> Can you figure out what this is doing?
what my modulo2 binary-value loop did much more painfully.
> (Not terribly obfuscated, I admit.)
>
> ov=${(L)${${ov/on/OFF}/off/on}}
>
> BTW, that works only in 3.1.5-pws-something. Exercise for the reader:
> What two characters, inserted twice, give the same effect in 3.0.5?
:s, which makes me wonder why the ${param/pattern/replacement}
construct was added at all.
--
Sweth Chandramouli
IS Coordinator, The George Washington University
<sweth@gwu.edu> / (202) 994 - 8521 (V) / (202) 994 - 0458 (F)
<a href="http://astaroth.nit.gwu.edu/~sweth/disc.html">*</a>
next prev parent reply other threads:[~1999-02-08 19:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-08 0:37 Sweth Chandramouli
1999-02-08 1:59 ` Bart Schaefer
1999-02-08 4:52 ` Sweth Chandramouli
1999-02-08 7:33 ` Bart Schaefer
1999-02-08 15:30 ` Sweth Chandramouli
1999-02-08 18:45 ` Bart Schaefer
1999-02-08 19:15 ` Sweth Chandramouli [this message]
1999-02-08 19:44 ` Bart Schaefer
1999-02-08 19:59 ` Sweth Chandramouli
1999-02-08 20:55 ` Bart Schaefer
1999-02-12 19:34 ` Sweth Chandramouli
1999-02-12 20:13 ` Bart Schaefer
1999-02-08 19:46 ` Sweth Chandramouli
1999-02-08 20:30 ` Bart Schaefer
1999-02-09 8:40 ` Phil Pennock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19990208141534.A4151@astaroth.nit.gwu.edu \
--to=sweth@astaroth.nit.gwu.edu \
--cc=zsh-users@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).