zsh-users
 help / color / mirror / code / Atom feed
* zsh cygpath problem in cygwin
@ 2010-06-24 13:03 Jan Lübbe
  2010-06-24 13:16 ` Mikael Magnusson
  2010-06-24 13:54 ` d.henman
  0 siblings, 2 replies; 3+ messages in thread
From: Jan Lübbe @ 2010-06-24 13:03 UTC (permalink / raw)
  To: zsh-users

Hello zsh users,

I have a very strange problem in cygwin. If I use cygpath normally in 
the zsh everything is fine. But if I assign a variable like JAVA_HOME 
then strange thinks happen. "k\b" disappears and stuff like that. The 
strange thing is, that this does not happen in bash under cygwin. It 
must somehow be related to the zsh. Do you have any ideas?

% JAVA_HOME="`cygpath -wl /cygdrive/d/Programme/Java/JavaEE61x32/jdk/bin`"
% echo $JAVA_HOME
D:\Programme\Java\JavaEE61x32\jdin
% cygpath -wl 
/cygdrive/d/Programme/Java/JavaEE61x32/jdk/bin/jboss-5.1.0.GA/bin
D:\Programme\Java\JavaEE61x32\jdk\bin


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

* Re: zsh cygpath problem in cygwin
  2010-06-24 13:03 zsh cygpath problem in cygwin Jan Lübbe
@ 2010-06-24 13:16 ` Mikael Magnusson
  2010-06-24 13:54 ` d.henman
  1 sibling, 0 replies; 3+ messages in thread
From: Mikael Magnusson @ 2010-06-24 13:16 UTC (permalink / raw)
  To: Jan Lübbe; +Cc: zsh-users

On 24 June 2010 15:03, Jan Lübbe <jlu@ivu.de> wrote:
> Hello zsh users,
>
> I have a very strange problem in cygwin. If I use cygpath normally in the
> zsh everything is fine. But if I assign a variable like JAVA_HOME then
> strange thinks happen. "k\b" disappears and stuff like that. The strange
> thing is, that this does not happen in bash under cygwin. It must somehow be
> related to the zsh. Do you have any ideas?
>
> % JAVA_HOME="`cygpath -wl /cygdrive/d/Programme/Java/JavaEE61x32/jdk/bin`"
> % echo $JAVA_HOME
> D:\Programme\Java\JavaEE61x32\jdin
> % cygpath -wl
> /cygdrive/d/Programme/Java/JavaEE61x32/jdk/bin/jboss-5.1.0.GA/bin
> D:\Programme\Java\JavaEE61x32\jdk\bin

echo interprets escape sequences, you can use echo -E to suppress
this. The variable itself is correctly assigned. (\b means move the
cursor back one step, so this causes the i to overwrite the k.)

-- 
Mikael Magnusson


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

* Re: zsh cygpath problem in cygwin
  2010-06-24 13:03 zsh cygpath problem in cygwin Jan Lübbe
  2010-06-24 13:16 ` Mikael Magnusson
@ 2010-06-24 13:54 ` d.henman
  1 sibling, 0 replies; 3+ messages in thread
From: d.henman @ 2010-06-24 13:54 UTC (permalink / raw)
  To: =?ISO-8859-15?Q?Jan_L=FCbbe?=; +Cc: zsh-users


That is not a zsh problem or bug.  

The variable is getting set properly, it just that you can't print it out, because the display routine see's the backslashes, \'s, and treats it as an escape character, which means the next character is probably being turned into a non-printable control character.

N.B. for others "cygpath" is a command to translate windows pathnames to posix style names or other direction.

Jan Lübbe <jlu@ivu.de> wrote:
> I have a very strange problem in cygwin. If I use cygpath normally in
> the zsh everything is fine. But if I assign a variable like JAVA_HOME
> then strange thinks happen. "k\b" disappears and stuff like that. The
> strange thing is, that this does not happen in bash under cygwin. It
> must somehow be related to the zsh. Do you have any ideas?
> 
> % JAVA_HOME="`cygpath -wl /cygdrive/d/Programme/Java/JavaEE61x32/jdk/bin`"
> % echo $JAVA_HOME
> D:\Programme\Java\JavaEE61x32\jdin

The below is not a full command? The argument is missing.
I suppose you meant --> cygpath -u "$JAVA_HOME"
> % cygpath -wl
> /cygdrive/d/Programme/Java/JavaEE61x32/jdk/bin/jboss-5.1.0.GA/bin
> D:\Programme\Java\JavaEE61x32\jdk\bin

Hope this helps.  The echo command willn ot output the results correctly, but
% cygpath -u "$JAVA_HOME"
will work and even the redundant

% cygpath -wl "$JAVA_HOME"
which will give you the same value.


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

end of thread, other threads:[~2010-06-24 14:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-24 13:03 zsh cygpath problem in cygwin Jan Lübbe
2010-06-24 13:16 ` Mikael Magnusson
2010-06-24 13:54 ` d.henman

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