This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Context menu entry "Bash Prompt Here" doesn't change to directory if name contains non ASCII characters
- From: "Bernhard Fischer" <xzy987 at gmx dot net>
- To: cygwin at cygwin dot com
- Date: Sun, 18 Sep 2016 11:04:02 +0200
- Subject: Context menu entry "Bash Prompt Here" doesn't change to directory if name contains non ASCII characters
- Authentication-results: sourceware.org; auth=none
- References: <trinity-33bde70d-20cc-40d2-839d-546344b008d4-1474188567067@3capp-gmx-bs10>
- Sensitivity: Normal
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