Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directory Paths not working for Cygwin #27

Open
kalaschnik opened this issue May 10, 2020 · 7 comments
Open

Directory Paths not working for Cygwin #27

kalaschnik opened this issue May 10, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@kalaschnik
Copy link

Cygwin maps Linux POSIX paths to Windows Path and prefixes the current path with /cygdrive/

That means, assume you are in this folder: C:\Users\Username\git\project the corresponding cygwin path would be /cygdrive/c/Users/Username/git/project

Could you prepend the /cygdrive/ if a users defines an id which contains cygwin in the commandline property. I’m not a Powershell scripter, so it woud take too much time for me.

@kerol2r20 kerol2r20 added the bug Something isn't working label May 11, 2020
@kerol2r20
Copy link
Owner

One question is how to identify a profile is Cygwin environment?
Because this profile is added by user, it's not easy to guarantee a fixed pattern.

@kalaschnik
Copy link
Author

Either by checken the commandline property with a regular expression as cygwin by default has its own name included in the install directory (i.e., cygwin64 or cygwin32) see here:

Windows Terminal’s settings.json:

{
    "guid": "{07ece1cb-ff14-4179-a738-1781081fd8be}",
    "hidden": false,
    "name": "Cygwin",
    "icon": "C:/cygwin64/Cygwin-Terminal.ico",
    "commandline": "c:/cygwin64/Cygwin.bat",
    "startingDirectory": "/cygdrive/d",
    "backgroundImage": "%OneDrive%/.config/.assets/cygwin.png",
    "backgroundImageOpacity": 0.1
},

Or you could also allow a user to set a flag, in case the go crazy and change cygwin names to something different:

This project’s config.json:

"{07ece1cb-ff14-4179-a738-1781081fd8be}": {
    "icon": "cygwin.ico",
    "isCygwin": true
},

I think the latter option is safest.

@kerol2r20
Copy link
Owner

kerol2r20 commented May 12, 2020

These two way are good!
Have you tried to open wt.exe with /cygdrive/c path?

I tried `wt.exe -p "Cygwin" -d /cygdrive/c/". But it did not worke.

@kalaschnik
Copy link
Author

Same, it does not like the -d operation... hmm

@kalaschnik
Copy link
Author

kalaschnik commented Jun 23, 2020

@rescenic Well, how does this solve anything regarding the issue (i.e., open a desired folder location using shell menu)?

@rescenic
Copy link

Yeah, doesn't work for Cygwin & MSYS2. My bad. It works for WSL, CMD, PowerShell.
wsl

@Akshay-akkay
Copy link

Same issue is happening for Git Bash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants