zsh-users
 help / color / mirror / code / Atom feed
* How to do filename completion with umlauts?
@ 2003-01-20 15:29 Andy Spiegl
  2003-01-20 16:06 ` Borzenkov Andrey
  2003-01-20 16:07 ` How to do filename completion with umlauts? Oliver Kiddle
  0 siblings, 2 replies; 6+ messages in thread
From: Andy Spiegl @ 2003-01-20 15:29 UTC (permalink / raw)
  To: ZSH User List

Hi,

how do I make case-insensitive filename completion work with umlauts?
I tried
 zstyle ":completion:*" matcher-list 'm:{A-Zöäüa-zÖÄÜ}={a-zöäüA-ZÖÄÜ}'
but it doesn't work.

Thanks!
 Andy.

-- 
           http://peru.spiegl.de  Our project
      http://radiomaranon.org.pe  Radio Marañón, Jaén, Perú
                              o      _     _         _
  ------- __o       __o      /\_   _ \\o  (_)\__/o  (_)          -o)
  ----- _`\<,_    _`\<,_    _>(_) (_)/<_    \_| \   _|/' \/       /\\
  ---- (_)/ (_)  (_)/ (_)  (_)        (_)   (_)    (_)'  _\o_    _\_v
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 I've learned....
  that the less time I have to work with, the more things I get done.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: How to do filename completion with umlauts?
  2003-01-20 15:29 How to do filename completion with umlauts? Andy Spiegl
@ 2003-01-20 16:06 ` Borzenkov Andrey
  2003-01-20 16:35   ` Andy Spiegl
  2003-01-20 16:07 ` How to do filename completion with umlauts? Oliver Kiddle
  1 sibling, 1 reply; 6+ messages in thread
From: Borzenkov Andrey @ 2003-01-20 16:06 UTC (permalink / raw)
  To: 'Andy Spiegl', 'ZSH User List'


> Hi,
> 
> how do I make case-insensitive filename completion work with umlauts?
> I tried
>  zstyle ":completion:*" matcher-list 'm:{A-Zöäüa-zÖÄÜ}={a-zöäüA-ZÖÄÜ}'
> but it doesn't work.
> 

Hmm ... works here (in one direction) in Cyrillic:

bor@cooker% zstyle ':completion:*' matcher-list 'm:{a-zабв}={A-ZАБВ}' '+r:|[._-]=** r:|=**'
bor@cooker% l аTAB
bor@cooker% l АААБ
Completing files
АААБ   АААГ   АААВ

May it depend on locale settings? Do you have locale set up?

bor@cooker% env | grep LANG
LANG=ru_RU.KOI8-R
LANGUAGE=ru_RU:ru
bor@cooker% env | grep LC
LC_CTYPE=ru_RU.KOI8-R
LC_COLLATE=ru_RU.KOI8-R
LC_MESSAGES=ru_RU.KOI8-R
LC_MONETARY=ru_RU.KOI8-R
LC_NUMERIC=ru_RU.KOI8-R
LC_TIME=ru_RU.KOI8-R

This is on Mandrake with zsh 4.0.6

-andrey


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to do filename completion with umlauts?
  2003-01-20 15:29 How to do filename completion with umlauts? Andy Spiegl
  2003-01-20 16:06 ` Borzenkov Andrey
@ 2003-01-20 16:07 ` Oliver Kiddle
  1 sibling, 0 replies; 6+ messages in thread
From: Oliver Kiddle @ 2003-01-20 16:07 UTC (permalink / raw)
  To: Andy Spiegl; +Cc: ZSH User List

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 735 bytes --]

On 20 Jan, you wrote:
> Hi,
> 
> how do I make case-insensitive filename completion work with umlauts?
> I tried
>  zstyle ":completion:*" matcher-list 'm:{A-Zöäüa-zÖÄÜ}={a-zöäüA-ZÖÄÜ}'

You're mapping the characters to themselves instead of to the opposite
case. Try 'm:{A-Zöäüa-zÖÄÜ}={a-zÖÄÜA-Zöäü}' instead.

Oliver

This e-mail and any attachment is for authorised use by the intended recipient(s) only.  It may contain proprietary material, confidential information and/or be subject to legal privilege.  It should not be copied, disclosed to, retained or used by, any other party.  If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.  Thank you.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to do filename completion with umlauts?
  2003-01-20 16:06 ` Borzenkov Andrey
@ 2003-01-20 16:35   ` Andy Spiegl
       [not found]     ` <10585.1043139241@finches.logica.co.uk>
  0 siblings, 1 reply; 6+ messages in thread
From: Andy Spiegl @ 2003-01-20 16:35 UTC (permalink / raw)
  To: ZSH User List

Hi Andrey and Oliver,

thanks for your help, but it still doesn't work. :-(

> May it depend on locale settings? Do you have locale set up?
Yes.  I didn't have all the LC_* set up, just LC_ALL but even after copying
your setup it doesn't work.

> This is on Mandrake with zsh 4.0.6
Here Debian Package zsh 4.0.4-33

> > how do I make case-insensitive filename completion work with umlauts?
> > I tried
> >  zstyle ":completion:*" matcher-list 'm:{A-Zöäüa-zÖÄÜ}={a-zöäüA-ZÖÄÜ}'
> 
> You're mapping the characters to themselves instead of to the opposite
> case.
Oops!

> Try 'm:{A-Zöäüa-zÖÄÜ}={a-zÖÄÜA-Zöäü}' instead.
Unfortunately this doesn't work either. :-(

Now when I type TAB after an umlaut _nothing_ happens, it just beeps.
If I press TAB after a "normal" character it completes, but doesn't change
the case of umlauts either.  Hm, what else could be wrong?

Thanks,
 Andy.

-- 
           http://peru.spiegl.de  Our project
      http://radiomaranon.org.pe  Radio Marañón, Jaén, Perú
                              o      _     _         _
  ------- __o       __o      /\_   _ \\o  (_)\__/o  (_)          -o)
  ----- _`\<,_    _`\<,_    _>(_) (_)/<_    \_| \   _|/' \/       /\\
  ---- (_)/ (_)  (_)/ (_)  (_)        (_)   (_)    (_)'  _\o_    _\_v
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   "There are two major products that come out of Berkeley: LSD and UNIX.
      We don't believe this to be a coincidence." - Jeremy S. Anderson


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to do filename completion with umlauts?
       [not found]     ` <10585.1043139241@finches.logica.co.uk>
@ 2003-01-21 17:55       ` Andy Spiegl
       [not found]         ` <13027.1043344725@finches.logica.co.uk>
  0 siblings, 1 reply; 6+ messages in thread
From: Andy Spiegl @ 2003-01-21 17:55 UTC (permalink / raw)
  To: ZSH User List

Hi Oliver,

thanks for helping me!

> Can you try just using a simple function like this:
> _foo () {
> compadd -M 'm:{A-Zöäüa-zÖÄÜ}={a-zÖÄÜA-Zöäü}' - Ö123 Ä123 A567 Ü987
> }
> compdef _foo foo
> foo ä<tab>

Yep works.  After the TAB I get "foo Ä123".
Hm, so why doesn't it work with normal completion?

Do you see any problem with these lines in my setup maybe?

zstyle ':completion:*' completer _expand_dots _complete _match _correct
zstyle ':completion::match:*' original yes
zstyle ':completion::match:*' insert-unambiguous true
zstyle ':completion::approximate:*' max-errors 2 numeric
zstyle ':completion::approximate:*' insert-unambiguous true
zstyle ':completion:*' ignore-parents parent pwd
zstyle ':incremental' completer _complete _correct
zstyle ':predict' completer _complete
zstyle ':completion:*:*:(^rm):*:*files' ignored-patterns '*?.(o|c~)' '*?~'
unsetopt rec_exact
zstyle ':completion:*:(cd|chdir|pushd|popd):*' special-dirs ..
zstyle ':completion:*:*:*' special-dirs ..
zstyle ':completion:*:*:*' special-dirs ..
zstyle ":completion:*" matcher-list 'm:{A-Zöäüa-zÖÄÜ}={a-zÖÄÜA-Zöäü}'
zstyle ':completion:*' squeeze-slashes true
zstyle ':completion:*' menu select=5
zstyle '*:matches' group 'yes'
zstyle ':completion:*' group-name ''
zstyle ':completion:*:*' group-order builtins functions aliases commands

Thanks so much,
 Andy.

-- 
           http://peru.spiegl.de  Our project
      http://radiomaranon.org.pe  Radio Marañón, Jaén, Perú
                              o      _     _         _
  ------- __o       __o      /\_   _ \\o  (_)\__/o  (_)          -o)
  ----- _`\<,_    _`\<,_    _>(_) (_)/<_    \_| \   _|/' \/       /\\
  ---- (_)/ (_)  (_)/ (_)  (_)        (_)   (_)    (_)'  _\o_    _\_v
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 The word "WINDOWS" stems from an old Sioux-dialect and means:
 "White man stares through screen at hour glass."


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to do filename completion with umlauts? - SOLVED
       [not found]         ` <13027.1043344725@finches.logica.co.uk>
@ 2003-01-23 18:35           ` Andy Spiegl
  0 siblings, 0 replies; 6+ messages in thread
From: Andy Spiegl @ 2003-01-23 18:35 UTC (permalink / raw)
  To: ZSH User List

Hi Oliver,

> However, I could reproduce the problem under zsh 4.0.2. What version are
> you running because 4.0.6 and recent 4.1 seem to work fine?
condor:~>echo $ZSH_VERSION
4.0.4

Wait a moment, I'll quickly update to 4.0.6....

condor:~#apt-get -t testing install zsh
...
 (zsh 4.0.4-33 ---> zsh_4.0.6-13)
...
condor:~>zsh
condor:~>touch abcäüasd
condor:~>ls abcÄ<tab>

And it works!  Great, so it _was_ a bug!

Thanks a lot for your help,
 Andy.

-- 
           http://peru.spiegl.de  Our project
      http://radiomaranon.org.pe  Radio Marañón, Jaén, Perú
                              o      _     _         _
  ------- __o       __o      /\_   _ \\o  (_)\__/o  (_)          -o)
  ----- _`\<,_    _`\<,_    _>(_) (_)/<_    \_| \   _|/' \/       /\\
  ---- (_)/ (_)  (_)/ (_)  (_)        (_)   (_)    (_)'  _\o_    _\_v
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Don't keep a negative attitude, such as
       "I will not succeed, I will not succeed."
    Instead, keep a positive attitude, such as
       "I WILL fail.  I WILL fail."


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-01-23 18:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-20 15:29 How to do filename completion with umlauts? Andy Spiegl
2003-01-20 16:06 ` Borzenkov Andrey
2003-01-20 16:35   ` Andy Spiegl
     [not found]     ` <10585.1043139241@finches.logica.co.uk>
2003-01-21 17:55       ` Andy Spiegl
     [not found]         ` <13027.1043344725@finches.logica.co.uk>
2003-01-23 18:35           ` How to do filename completion with umlauts? - SOLVED Andy Spiegl
2003-01-20 16:07 ` How to do filename completion with umlauts? Oliver Kiddle

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).