Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: setopt and alias questions
- X-seq: zsh-users 2119
- From: Sweth Chandramouli <sweth@xxxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxx
- Subject: Re: setopt and alias questions
- Date: Mon, 8 Feb 1999 14:15:34 -0500
- In-reply-to: <990208104550.ZM14297@xxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <19990207193735.A2060@xxxxxxxxxxxxxxxxxxxx> <990207175931.ZM8940@xxxxxxxxxxxxxxxxxxxxxxx> <19990207235214.A2653@xxxxxxxxxxxxxxxxxxxx> <990207233343.ZM10079@xxxxxxxxxxxxxxxxxxxxxxx> <19990208103038.A3447@xxxxxxxxxxxxxxxxxxxx> <990208104550.ZM14297@xxxxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxx> / (202) 994 - 8521 (V) / (202) 994 - 0458 (F)
<a href="http://astaroth.nit.gwu.edu/~sweth/disc.html">*</a>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author