public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Bernhard Fischer" <xzy987@gmx.net>
To: cygwin@cygwin.com
Subject: Context menu entry "Bash Prompt Here" doesn't change to directory if name contains non ASCII characters
Date: Sun, 18 Sep 2016 16:42:00 -0000	[thread overview]
Message-ID: <trinity-5db9fb95-aa9b-4339-9d67-823be6503618-1474189442595@3capp-gmx-bs24> (raw)
In-Reply-To: <trinity-33bde70d-20cc-40d2-839d-546344b008d4-1474188567067@3capp-gmx-bs10>

I recently moved from Windows XP x86 to Windows 10 x64 and observed that the context menu entry "Bash Prompt Here" doesn't change to the desired directory if the directory name contains non ASCII characters.
 
Example: Create a directory named "D:\Käse" (German "Käse" is English "cheese") and select the context menu entry "Bash Prompt Here". If the menu entry is selected from the (left) tree view of Windows Explorer, the current directory of the bash is "/cygdrive/c/WINDOWS/system32", if selected from the (right) list view, the current directory is "/cygdrive/d". Expected is the current directory "/cygdrive/d/Käse" in both cases.
 
The registry entry is as follows:
D:\Programme\CygWin\bin\mintty.exe -e /bin/xhere /bin/bash.exe "%V"
 
The context menu works correct with the following patch applied to "/bin/xhere":
52c52,57
<  CHERE_DIR=`$CYGPATH "$2"`
---
>  WIN_PATH="$2"
>  # Strip away surrounding double quotes if present
>  if [ ${WIN_PATH:0:1} == "\"" -a ${WIN_PATH:(-1):1} == "\"" ]; then
>   WIN_PATH="${WIN_PATH:1:${#WIN_PATH}-2}"
>  fi
>  CHERE_DIR=`$CYGPATH "$WIN_PATH"`
 
Bernhard

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

           reply	other threads:[~2016-09-18  9:04 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <trinity-33bde70d-20cc-40d2-839d-546344b008d4-1474188567067@3capp-gmx-bs10>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=trinity-5db9fb95-aa9b-4339-9d67-823be6503618-1474189442595@3capp-gmx-bs24 \
    --to=xzy987@gmx.net \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).