How to set path for MinTTY under windows/cygwin correctly?
I made windows shortcut with the following target:
D:APPScygwin64binmintty.exe /bin/env PATH=/local/bin:/usr/local/bin:$PATH /bin/bash --login -i
I was expecting it prepend path with my given values, but it doesn't:
$ echo $PATH
/usr/local/bin:/usr/bin:/local/bin:/usr/local/bin:$PATH:/usr/lib/lapack
i.e. $PATH
text went into content without expansion.
How to overcome?
windows cygwin path environment-variables mintty
add a comment |
I made windows shortcut with the following target:
D:APPScygwin64binmintty.exe /bin/env PATH=/local/bin:/usr/local/bin:$PATH /bin/bash --login -i
I was expecting it prepend path with my given values, but it doesn't:
$ echo $PATH
/usr/local/bin:/usr/bin:/local/bin:/usr/local/bin:$PATH:/usr/lib/lapack
i.e. $PATH
text went into content without expansion.
How to overcome?
windows cygwin path environment-variables mintty
add a comment |
I made windows shortcut with the following target:
D:APPScygwin64binmintty.exe /bin/env PATH=/local/bin:/usr/local/bin:$PATH /bin/bash --login -i
I was expecting it prepend path with my given values, but it doesn't:
$ echo $PATH
/usr/local/bin:/usr/bin:/local/bin:/usr/local/bin:$PATH:/usr/lib/lapack
i.e. $PATH
text went into content without expansion.
How to overcome?
windows cygwin path environment-variables mintty
I made windows shortcut with the following target:
D:APPScygwin64binmintty.exe /bin/env PATH=/local/bin:/usr/local/bin:$PATH /bin/bash --login -i
I was expecting it prepend path with my given values, but it doesn't:
$ echo $PATH
/usr/local/bin:/usr/bin:/local/bin:/usr/local/bin:$PATH:/usr/lib/lapack
i.e. $PATH
text went into content without expansion.
How to overcome?
windows cygwin path environment-variables mintty
windows cygwin path environment-variables mintty
asked Sep 30 '13 at 12:34
Suzan CiocSuzan Cioc
988102848
988102848
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Well I see this is coming a bit late, but hopefully it can help you or someone else having a similar problem.
Since you are running a Windows shortcut, instead of using the syntax for cygwin/*nix environment variable expansion ($VAR_NAME
) you probably just need to use the syntax for Windows/CMD.exe expansion (%VAR_NAME%
). Also, I am linking two Wikibooks below that should cover pretty much anything you ever need to do with batch files for future reference.
That said, I would have expected your syntax also to work, and I do imagine there is some way to have expansions happen on the "other side", so-to-speak. If I can find a way as I work on my terminal launch script I will update this answer.
References:
Programming CMD has most of the basic syntax and essential commands
Windows Batch Scripting a fairly comprehensive reference for everything
Notes/Caveat Emptor
cmd
shell scripting leaves a lot to be desired, and I think you can easily google for something that gives you a run down on all the details. I just wanted to mention it, and mention that there is nothing stopping you from using something like 'MinGW-x64' (I recommend researching the difference between 'MinGW-x64' and the original if you are in doubt; they are maintained by separate entities), or something like Cygwin, which you clearly already have some experience with, either of which will allow you to do sh
/bash
scripting.
MinGW-x64 is simplified and has an incomplete POSIX implementation due to some concepts that are incompatible with the Windows Subsystem without some additional support (well, the Microsoft VC runtime, I guess; and I think there are circumstances where you need to at least with MinGW if not MinGW-x64) but I mention it first, since it is a 'native' (i.e. 'fast') solution.
Cygwin provides its 'compatibility layer' .dll
that provides a fairly complete POSIX environment, at the cost of (a) some fairly siginificant overhead (at least in some cases) and (b) having a fairly complex extra .dll
that has to be provided with any software you make with it, and at the cost/benefit (depending on your perspective) of being fairly well locked into the GPL if you use it for your project and link to the compatibility layer.
However, as an alternative, this answer mentions Red Hat's Cygwin license offer for non-GPL license terms on Cygwin, if you so desire. (And, of course assuming that it's cost-effective for you and your project.) However, for personal or in-house shell scripting (i.e., not 'distributed', an, so, not covered by the GPL) it might very well be a good choice, and would almost certainly be better than futzing around with the idiosyncrasies of a DOS-era product still stuck supporting poor decisions made well over 30 years ago.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f652281%2fhow-to-set-path-for-mintty-under-windows-cygwin-correctly%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Well I see this is coming a bit late, but hopefully it can help you or someone else having a similar problem.
Since you are running a Windows shortcut, instead of using the syntax for cygwin/*nix environment variable expansion ($VAR_NAME
) you probably just need to use the syntax for Windows/CMD.exe expansion (%VAR_NAME%
). Also, I am linking two Wikibooks below that should cover pretty much anything you ever need to do with batch files for future reference.
That said, I would have expected your syntax also to work, and I do imagine there is some way to have expansions happen on the "other side", so-to-speak. If I can find a way as I work on my terminal launch script I will update this answer.
References:
Programming CMD has most of the basic syntax and essential commands
Windows Batch Scripting a fairly comprehensive reference for everything
Notes/Caveat Emptor
cmd
shell scripting leaves a lot to be desired, and I think you can easily google for something that gives you a run down on all the details. I just wanted to mention it, and mention that there is nothing stopping you from using something like 'MinGW-x64' (I recommend researching the difference between 'MinGW-x64' and the original if you are in doubt; they are maintained by separate entities), or something like Cygwin, which you clearly already have some experience with, either of which will allow you to do sh
/bash
scripting.
MinGW-x64 is simplified and has an incomplete POSIX implementation due to some concepts that are incompatible with the Windows Subsystem without some additional support (well, the Microsoft VC runtime, I guess; and I think there are circumstances where you need to at least with MinGW if not MinGW-x64) but I mention it first, since it is a 'native' (i.e. 'fast') solution.
Cygwin provides its 'compatibility layer' .dll
that provides a fairly complete POSIX environment, at the cost of (a) some fairly siginificant overhead (at least in some cases) and (b) having a fairly complex extra .dll
that has to be provided with any software you make with it, and at the cost/benefit (depending on your perspective) of being fairly well locked into the GPL if you use it for your project and link to the compatibility layer.
However, as an alternative, this answer mentions Red Hat's Cygwin license offer for non-GPL license terms on Cygwin, if you so desire. (And, of course assuming that it's cost-effective for you and your project.) However, for personal or in-house shell scripting (i.e., not 'distributed', an, so, not covered by the GPL) it might very well be a good choice, and would almost certainly be better than futzing around with the idiosyncrasies of a DOS-era product still stuck supporting poor decisions made well over 30 years ago.
add a comment |
Well I see this is coming a bit late, but hopefully it can help you or someone else having a similar problem.
Since you are running a Windows shortcut, instead of using the syntax for cygwin/*nix environment variable expansion ($VAR_NAME
) you probably just need to use the syntax for Windows/CMD.exe expansion (%VAR_NAME%
). Also, I am linking two Wikibooks below that should cover pretty much anything you ever need to do with batch files for future reference.
That said, I would have expected your syntax also to work, and I do imagine there is some way to have expansions happen on the "other side", so-to-speak. If I can find a way as I work on my terminal launch script I will update this answer.
References:
Programming CMD has most of the basic syntax and essential commands
Windows Batch Scripting a fairly comprehensive reference for everything
Notes/Caveat Emptor
cmd
shell scripting leaves a lot to be desired, and I think you can easily google for something that gives you a run down on all the details. I just wanted to mention it, and mention that there is nothing stopping you from using something like 'MinGW-x64' (I recommend researching the difference between 'MinGW-x64' and the original if you are in doubt; they are maintained by separate entities), or something like Cygwin, which you clearly already have some experience with, either of which will allow you to do sh
/bash
scripting.
MinGW-x64 is simplified and has an incomplete POSIX implementation due to some concepts that are incompatible with the Windows Subsystem without some additional support (well, the Microsoft VC runtime, I guess; and I think there are circumstances where you need to at least with MinGW if not MinGW-x64) but I mention it first, since it is a 'native' (i.e. 'fast') solution.
Cygwin provides its 'compatibility layer' .dll
that provides a fairly complete POSIX environment, at the cost of (a) some fairly siginificant overhead (at least in some cases) and (b) having a fairly complex extra .dll
that has to be provided with any software you make with it, and at the cost/benefit (depending on your perspective) of being fairly well locked into the GPL if you use it for your project and link to the compatibility layer.
However, as an alternative, this answer mentions Red Hat's Cygwin license offer for non-GPL license terms on Cygwin, if you so desire. (And, of course assuming that it's cost-effective for you and your project.) However, for personal or in-house shell scripting (i.e., not 'distributed', an, so, not covered by the GPL) it might very well be a good choice, and would almost certainly be better than futzing around with the idiosyncrasies of a DOS-era product still stuck supporting poor decisions made well over 30 years ago.
add a comment |
Well I see this is coming a bit late, but hopefully it can help you or someone else having a similar problem.
Since you are running a Windows shortcut, instead of using the syntax for cygwin/*nix environment variable expansion ($VAR_NAME
) you probably just need to use the syntax for Windows/CMD.exe expansion (%VAR_NAME%
). Also, I am linking two Wikibooks below that should cover pretty much anything you ever need to do with batch files for future reference.
That said, I would have expected your syntax also to work, and I do imagine there is some way to have expansions happen on the "other side", so-to-speak. If I can find a way as I work on my terminal launch script I will update this answer.
References:
Programming CMD has most of the basic syntax and essential commands
Windows Batch Scripting a fairly comprehensive reference for everything
Notes/Caveat Emptor
cmd
shell scripting leaves a lot to be desired, and I think you can easily google for something that gives you a run down on all the details. I just wanted to mention it, and mention that there is nothing stopping you from using something like 'MinGW-x64' (I recommend researching the difference between 'MinGW-x64' and the original if you are in doubt; they are maintained by separate entities), or something like Cygwin, which you clearly already have some experience with, either of which will allow you to do sh
/bash
scripting.
MinGW-x64 is simplified and has an incomplete POSIX implementation due to some concepts that are incompatible with the Windows Subsystem without some additional support (well, the Microsoft VC runtime, I guess; and I think there are circumstances where you need to at least with MinGW if not MinGW-x64) but I mention it first, since it is a 'native' (i.e. 'fast') solution.
Cygwin provides its 'compatibility layer' .dll
that provides a fairly complete POSIX environment, at the cost of (a) some fairly siginificant overhead (at least in some cases) and (b) having a fairly complex extra .dll
that has to be provided with any software you make with it, and at the cost/benefit (depending on your perspective) of being fairly well locked into the GPL if you use it for your project and link to the compatibility layer.
However, as an alternative, this answer mentions Red Hat's Cygwin license offer for non-GPL license terms on Cygwin, if you so desire. (And, of course assuming that it's cost-effective for you and your project.) However, for personal or in-house shell scripting (i.e., not 'distributed', an, so, not covered by the GPL) it might very well be a good choice, and would almost certainly be better than futzing around with the idiosyncrasies of a DOS-era product still stuck supporting poor decisions made well over 30 years ago.
Well I see this is coming a bit late, but hopefully it can help you or someone else having a similar problem.
Since you are running a Windows shortcut, instead of using the syntax for cygwin/*nix environment variable expansion ($VAR_NAME
) you probably just need to use the syntax for Windows/CMD.exe expansion (%VAR_NAME%
). Also, I am linking two Wikibooks below that should cover pretty much anything you ever need to do with batch files for future reference.
That said, I would have expected your syntax also to work, and I do imagine there is some way to have expansions happen on the "other side", so-to-speak. If I can find a way as I work on my terminal launch script I will update this answer.
References:
Programming CMD has most of the basic syntax and essential commands
Windows Batch Scripting a fairly comprehensive reference for everything
Notes/Caveat Emptor
cmd
shell scripting leaves a lot to be desired, and I think you can easily google for something that gives you a run down on all the details. I just wanted to mention it, and mention that there is nothing stopping you from using something like 'MinGW-x64' (I recommend researching the difference between 'MinGW-x64' and the original if you are in doubt; they are maintained by separate entities), or something like Cygwin, which you clearly already have some experience with, either of which will allow you to do sh
/bash
scripting.
MinGW-x64 is simplified and has an incomplete POSIX implementation due to some concepts that are incompatible with the Windows Subsystem without some additional support (well, the Microsoft VC runtime, I guess; and I think there are circumstances where you need to at least with MinGW if not MinGW-x64) but I mention it first, since it is a 'native' (i.e. 'fast') solution.
Cygwin provides its 'compatibility layer' .dll
that provides a fairly complete POSIX environment, at the cost of (a) some fairly siginificant overhead (at least in some cases) and (b) having a fairly complex extra .dll
that has to be provided with any software you make with it, and at the cost/benefit (depending on your perspective) of being fairly well locked into the GPL if you use it for your project and link to the compatibility layer.
However, as an alternative, this answer mentions Red Hat's Cygwin license offer for non-GPL license terms on Cygwin, if you so desire. (And, of course assuming that it's cost-effective for you and your project.) However, for personal or in-house shell scripting (i.e., not 'distributed', an, so, not covered by the GPL) it might very well be a good choice, and would almost certainly be better than futzing around with the idiosyncrasies of a DOS-era product still stuck supporting poor decisions made well over 30 years ago.
edited May 23 '17 at 12:41
Community♦
1
1
answered May 13 '14 at 13:38
shelleybutterflyshelleybutterfly
1485
1485
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f652281%2fhow-to-set-path-for-mintty-under-windows-cygwin-correctly%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown