Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

ideas: free-search-complete, noexpand



Moments ago, I was searching for the option MARK_DIRS, trying to
remember its name without glimpsing in the manpage or complete list of
options, when I was struck by an interesting idea:

Wouldn't it be really nice if there was a completion mechanism that
wasn't locked to complete from the beginning of your word only, but
instead would find "mark_dirs" from a larger list of possible
completions, given the string "dir"? "free-search-complete" might be a
good name for the mechanism.

I'd love this one --- am I the only one who always seems to remember
parts of filenames that aren't their first characters? :-/

...and how come there is a 'noglob' command, but no 'nohist', 'noexpand'
(not attempting any form of expansion whatsoever) and so forth? I, for
one, would find both these forms convenient, especially for allowing
lightningly-fast usage of functions such as

say () { print "$*" | write friend }

where I could do

alias say='noexpand say'

and use the function entirely without bothering about quotation... <now,
is this guy lazy or what? :-)>

Earlier on, I repeatedly made the mistake of trying to give commands
such as:

say Hi!!! It's been a while, now!

<the audience grins>

NOBANGHIST was one of the first options I dug up, and evolution applied
on the above function generated something like

alias say="cat <<. | write friend"

but I didn't like that solution. At the moment I'm trying to live with
manual quoting of necessary characters, but since the backslash isn't
all that conveniently placed in the swedish keyboard layout (AltGr-'+'),
it is a bit annoying trying to catch all odd bits'n'ends.

say \"It\'s a pain in the \*ss\", he thought to himself.

Am I being picky? :-) I hope my sarcasms didn't upset anybody, they
weren't meant to. You do know I love you all, right? :)

/Johan Sundström, part-time zsh freak, part-time human being



Messages sorted by: Reverse Date, Date, Thread, Author