* howto expand all possible completions?
@ 2006-06-23 23:29 Andy Spiegl
2006-06-24 3:19 ` Bart Schaefer
0 siblings, 1 reply; 6+ messages in thread
From: Andy Spiegl @ 2006-06-23 23:29 UTC (permalink / raw)
To: zsh-users
Say:
condor:~/pic/Nature/space>l ad<TAB>
files
adlernebel_infrarotaufnahme.jpg adlernebel.jpg
So I just press * and the key for expand-word and get this:
condor:~/pic/Nature/space>qiv adlernebel_infrarotaufnahme.jpg adlernebel.jpg
But not in this case:
condor:~/pic/Nature/space>qiv n<TAB>
file
n1300.gif n1499.gif Nebel_NGC_2264.jpg NGC-1999.jpg
How would I get zsh to add all these 4 files to command line?
Like so:
condor:~/pic/Nature/space>qiv n1300.gif n1499.gif Nebel_NGC_2264.jpg NGC-1999.jpg
Is there something like expand-completions or similar?
Thanks,
Andy.
--
Fotos: francisco.spiegl.de o _ _ _
Infos: peru.spiegl.de __o /\_ _ \\o (_)\__/o (_) -o)
Andy, Heidi, Francisco _`\<,_ _>(_) (_)/<_ \_| \ _|/' \/ /\\
heidi.und.andy@spiegl.de (_)/ (_) (_) (_) (_) (_)' _\o_ _\_v
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Fate protects fools, small children, and ships named Enterprise.
-- Commander Riker
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: howto expand all possible completions?
2006-06-23 23:29 howto expand all possible completions? Andy Spiegl
@ 2006-06-24 3:19 ` Bart Schaefer
2006-06-24 20:57 ` Andy Spiegl
0 siblings, 1 reply; 6+ messages in thread
From: Bart Schaefer @ 2006-06-24 3:19 UTC (permalink / raw)
To: zsh-users
On Jun 24, 1:29am, Andy Spiegl wrote:
}
} Is there something like expand-completions or similar?
Do you already have _expand in your completers style?
If so, my only other suggestion would be to try setopt nocaseglob. I
suspect that you have a lower-case to upper-case matcher-list style
that is producing the mixed-case completions in the second example.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: howto expand all possible completions?
2006-06-24 3:19 ` Bart Schaefer
@ 2006-06-24 20:57 ` Andy Spiegl
2006-06-25 3:04 ` Bart Schaefer
0 siblings, 1 reply; 6+ messages in thread
From: Andy Spiegl @ 2006-06-24 20:57 UTC (permalink / raw)
To: zsh-users
Hi Bart,
> } Is there something like expand-completions or similar?
>
> Do you already have _expand in your completers style?
No, thanks for the hint!
Hm, the description of the function sounds great but I don't understand how
it's supposed to work. I've got TAB bound to complete-word and now use:
zstyle ':completion:*' completer _expand _expand_dots _complete _match _correct _7slash
but the behavior is still the same: when I press TAB I get to see all the
possible completions but they don't get written to the command line.
Do I need any other style definitions?
> If so, my only other suggestion would be to try setopt nocaseglob. I
> suspect that you have a lower-case to upper-case matcher-list style
> that is producing the mixed-case completions in the second example.
Correct. nocaseglob would help in this example of mine but there are many
different cases where the completer shows all kinds of different types of
possible completions, e.g. the "partial match" style:
zstyle ':completion:*' matcher-list 'm:{A-Zöäüa-zÖÄÜ}={a-zÖÄÜA-Zöäü} m:[-_]=[-_] r:|[-./_]=** r:|=*' '+l:|=*'
which gives:
condor:~/pic/Nature>qiv ham<TAB>
- files -
A-Caribbean-reef-shark-swims-over-a-coral-reef-in-the-Bahamas.jpg cham1024.jpg cyclonegraham.jpg
I tried calling the _expand function manually (via Alt-x) but that just
hogged the CPU so that I had to kill zsh. :-(
Thanks,
Andy.
--
Isn't making a smoking section in a restaurant
like making a peeing section in a swimming pool? (George Carlin, US comedian)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: howto expand all possible completions?
2006-06-24 20:57 ` Andy Spiegl
@ 2006-06-25 3:04 ` Bart Schaefer
2006-06-25 19:17 ` Andy Spiegl
0 siblings, 1 reply; 6+ messages in thread
From: Bart Schaefer @ 2006-06-25 3:04 UTC (permalink / raw)
To: zsh-users
On Jun 24, 10:57pm, Andy Spiegl wrote:
} Subject: Re: howto expand all possible completions?
}
} > } Is there something like expand-completions or similar?
} >
} > Do you already have _expand in your completers style?
} No, thanks for the hint!
Actually I misspoke. I was conflating the all-expansions tag of the
_expand completer with the _all_matches completer. The latter is what
you actually want to use.
} I tried calling the _expand function manually (via Alt-x) but that just
} hogged the CPU so that I had to kill zsh. :-(
That's odd.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: howto expand all possible completions?
2006-06-25 3:04 ` Bart Schaefer
@ 2006-06-25 19:17 ` Andy Spiegl
2006-06-25 19:37 ` Bart Schaefer
0 siblings, 1 reply; 6+ messages in thread
From: Andy Spiegl @ 2006-06-25 19:17 UTC (permalink / raw)
To: zsh-users
> Actually I misspoke. I was conflating the all-expansions tag of the
> _expand completer with the _all_matches completer. The latter is what
> you actually want to use.
Great, that's it! Thanks a lot!
> } I tried calling the _expand function manually (via Alt-x) but that just
> } hogged the CPU so that I had to kill zsh. :-(
>
> That's odd.
Lately I've got more strange things happening - including crashes.
Today I found a reproducible one:
In the following case zsh segfaults after hitting TAB 3 times:
First TAB:
condor:~/pic/Nature>qiv a<TAB>
- files -
abcdefghi.gif Affe.Kissen.png Alligator_in_geplatzter_Python.jpg ape.gif ape.jpg
The second TAB starts menu-completion and the third TAB crashes zsh:
condor:~/pic/Nature>qiv a[1] 29107 segmentation fault zsh
(If I delete one of these files, it does not crash)
How would I best go about reporting this bug?
It doesn't crash when I press C-x ? instead of TAB.
Chau,
Andy.
--
When women are depressed they either eat or go shopping.
Men invade another country. --- Elayne Boosler
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: howto expand all possible completions?
2006-06-25 19:17 ` Andy Spiegl
@ 2006-06-25 19:37 ` Bart Schaefer
0 siblings, 0 replies; 6+ messages in thread
From: Bart Schaefer @ 2006-06-25 19:37 UTC (permalink / raw)
To: zsh-users
On Jun 25, 9:17pm, Andy Spiegl wrote:
}
} How would I best go about reporting this bug?
You just did. :-) Seriously, though, it's best if you can determine
an exact series of steps to reproduce it, starting from "zsh -f".
(Even if one of the steps is e.g. to run "compinit"). Then send that
to zsh-workers.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-06-25 19:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-23 23:29 howto expand all possible completions? Andy Spiegl
2006-06-24 3:19 ` Bart Schaefer
2006-06-24 20:57 ` Andy Spiegl
2006-06-25 3:04 ` Bart Schaefer
2006-06-25 19:17 ` Andy Spiegl
2006-06-25 19:37 ` Bart Schaefer
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).