zsh-workers
 help / color / mirror / code / Atom feed
* Weird file names
@ 2003-07-29 12:43 David Gómez
  2003-08-01 17:01 ` DervishD
  2003-08-04 11:16 ` Peter Stephenson
  0 siblings, 2 replies; 6+ messages in thread
From: David Gómez @ 2003-07-29 12:43 UTC (permalink / raw)
  To: Zsh-workers

[-- Attachment #1: Type: text/plain, Size: 845 bytes --]

Hi all ;),

I've found a strange behavior when using non-ascii characters in a file
name with zsh. I created a file with characters extracted from a utf8-encoded
file as a name (the file is attached with this mail).

When zsh does filename generation, with the file attached for example: 'cp
00* anotherfile', the characters are correctly interpreted, but the problem
arises when using completion. It seems that after using tab-completion and
choosing a file, the characters are modified in some way (i don't know very
much about how the completion module works), and the filename is different
from the real one, so any operation in the filesystem wiht the name that
zsh provides, fails.

Thanks

-- 
David Gómez

"The question of whether computers can think is just like the question of
 whether submarines can swim." -- Edsger W. Dijkstra



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

* Re: Weird file names
  2003-07-29 12:43 Weird file names David Gómez
@ 2003-08-01 17:01 ` DervishD
  2003-08-05 20:39   ` David Gómez
  2003-08-04 11:16 ` Peter Stephenson
  1 sibling, 1 reply; 6+ messages in thread
From: DervishD @ 2003-08-01 17:01 UTC (permalink / raw)
  To: Zsh-workers

    Hi David :)
 * <david@pleyades.net> dixit:
> It seems that after using tab-completion and
> choosing a file, the characters are modified in some way

    It happens with menu-completion, too.

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/


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

* Re: Weird file names
  2003-07-29 12:43 Weird file names David Gómez
  2003-08-01 17:01 ` DervishD
@ 2003-08-04 11:16 ` Peter Stephenson
  2003-08-05 20:37   ` David Gómez
  1 sibling, 1 reply; 6+ messages in thread
From: Peter Stephenson @ 2003-08-04 11:16 UTC (permalink / raw)
  To: David Gómez, Zsh-workers

David =?iso-8859-15?Q?G=F3mez?= wrote:
> I've found a strange behavior when using non-ascii characters in a file
> name with zsh. I created a file with characters extracted from a utf8-encoded
> file as a name (the file is attached with this mail).

Does this patch (to the zsh/complist module) fix it?  If not, could you
please tell us *exactly* what completion setup you have?  (I can't
reproduce this with just basic completion.)

If it does fix it, please don't ask me why.  (I'll delete the pws's if I
commit it, it's just to remind me I don't know what's going on.)

Index: Src/Zle/complist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/complist.c,v
retrieving revision 1.56
diff -u -r1.56 complist.c
--- Src/Zle/complist.c	14 May 2003 10:16:07 -0000	1.56
+++ Src/Zle/complist.c	4 Aug 2003 11:07:28 -0000
@@ -2801,7 +2801,9 @@
 		acc = 1;
 	    break;
 	}
+	metafy_line();		/* pws */
 	do_single(**p);
+	unmetafy_line();	/* pws */
 	mselect = (**p)->gnum;
     }
     if (u)
@@ -2817,7 +2819,9 @@
         clearlist = listshown = 1;
     if (acc && validlist && minfo.cur) {
 	menucmp = lastambig = hasoldlist = 0;
+	metafy_line();		/* pws */
 	do_single(*(minfo.cur));
+	unmetafy_line();	/* pws */
     }
     if (wasnext || broken) {
 	menucmp = 2;

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


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

* Re: Weird file names
  2003-08-04 11:16 ` Peter Stephenson
@ 2003-08-05 20:37   ` David Gómez
  0 siblings, 0 replies; 6+ messages in thread
From: David Gómez @ 2003-08-05 20:37 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh-workers

Hi Peter,

> Does this patch (to the zsh/complist module) fix it?  If not, could you
> please tell us *exactly* what completion setup you have?  (I can't
> reproduce this with just basic completion.)

Indeed i said that this bug hitted tab completion, but it only happens
with menu selection, i had it activated by default and forgotted to mention
it in my previous email. After checking it, tab completion is ok, but menu
selection 'transforms' the file name.

And yes, your patch fix the problem ;)

thanks,

-- 
David Gómez

"The question of whether computers can think is just like the question of
 whether submarines can swim." -- Edsger W. Dijkstra


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

* Re: Weird file names
  2003-08-01 17:01 ` DervishD
@ 2003-08-05 20:39   ` David Gómez
  2003-08-06  9:56     ` DervishD
  0 siblings, 1 reply; 6+ messages in thread
From: David Gómez @ 2003-08-05 20:39 UTC (permalink / raw)
  To: Zsh-workers

Hi Raúl ;),

>  * <david@pleyades.net> dixit:
> > It seems that after using tab-completion and
> > choosing a file, the characters are modified in some way
> 
>     It happens with menu-completion, too.

I noticed that only happens with menu-completion, normal completion does
not transform the file name. Peter's patch fixes the problem.


-- 
David Gómez

"The question of whether computers can think is just like the question of
 whether submarines can swim." -- Edsger W. Dijkstra


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

* Re: Weird file names
  2003-08-05 20:39   ` David Gómez
@ 2003-08-06  9:56     ` DervishD
  0 siblings, 0 replies; 6+ messages in thread
From: DervishD @ 2003-08-06  9:56 UTC (permalink / raw)
  To: Zsh-workers

    Hi David :)

 * David <david@pleyades.net> dixit:
> > > It seems that after using tab-completion and
> > > choosing a file, the characters are modified in some way
> >     It happens with menu-completion, too.
> I noticed that only happens with menu-completion, normal completion does
> not transform the file name. Peter's patch fixes the problem.

    Well, in fact I haven't tested it with tab completion...

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/


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

end of thread, other threads:[~2003-08-06 10:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-29 12:43 Weird file names David Gómez
2003-08-01 17:01 ` DervishD
2003-08-05 20:39   ` David Gómez
2003-08-06  9:56     ` DervishD
2003-08-04 11:16 ` Peter Stephenson
2003-08-05 20:37   ` David Gómez

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