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

Re: zsh cygpath problem in cygwin



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@xxxxxx> 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.



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