public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Andrey Repin <anrdaemon@yandex.ru>
To: Linda Walsh <cygwin@tlinx.org>, cygwin@cygwin.com
Subject: Re: Use of SHELL env var by login
Date: Tue, 27 Sep 2016 17:12:00 -0000	[thread overview]
Message-ID: <1373245590.20160927194222@yandex.ru> (raw)
In-Reply-To: <57EA9CEA.5010204@tlinx.org>

Greetings, Linda Walsh!

> Andrey Repin wrote:
>>> In the absence of /etc/passwd, setting SHELL is the right way to set your login
>>> shell.
>> 
>> One of the right ways, I'd say.
>> If your aim is the integration of both environments, you MAY set variables,
>> but if you then start a login shell, they may be voided by the startup scripts.
>> I would advise using "more other" ways to configure Cygwin, i.e. using SAM DB
>> comment field.
> ---
>         Windows *doesn't* use "SHELL" to set your command line, it uses
> COMSPEC.

Do note I didn't mention any specific variable names.
And I've explicitly outlined exactly the case you are describing in your post
- integration.
If you indeed have "more other" applications (native ports of certain tools,
which still use environment as a go-to reference sources), then by all means,
do what you find best for you.
I do that all the time, too, but I also have Cygwin itself configured to match
the environment I expect to have. Just to avoid issues.

> So setting SHELL won't do MS programs any good.  I set mine for
> the benefit of some non-MS programs that ran windows natively so I could
> have an easier time in some of my own scripting.  The form C:/bin/bash.exe
> was *NOT* set by cygwin prompting me to set it -- since it cygwin wanted a
> windows path it would only have accepted C:\bin\bash.exe.  If it wanted a
> non-windows, pure-posix-like path, it would have complained about referring
> to /c as "C:".  

> It's the unsupported "middle-ground" path that works in 
> win32 and cygwin -- but my cygwin is install @ '/' not /c/ (though they
> end up at the same point)  -- I mention the C: drive primarily for windows
> programs (if they are on another drive, the path /bin/bash.exe is processed
> as being on the "current drive", so in program like the _windows_ 
> _versions_ of 'vim/gvim', that "cd" to the same directory as the file you are
> editing, also end up changing drive letters (a network drive in my setup)
> where /bin/bash doesn't work (as /bin/bash would only work when drive 'C' is
> current).  You *can* set COMSPEC to something other than "cmd.exe", but I 
> would not -- since some windows program depend on COMSPEC to be cmd.exe ( :-( ).

> Setting SHELL will have no effect on Microsoft windows program -- it may
> on some non-MS programs running on windows, but i've not found it provided
> sufficient benefit for the troubles.  





> --
> 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




-- 
With best regards,
Andrey Repin
Tuesday, September 27, 2016 19:39:05

Sorry for my terrible english...


--
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-27 16:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-26 20:53 Ernie Rael
2016-09-27  2:24 ` Linda Walsh
2016-09-27  5:35   ` Ernie Rael
2016-09-27 11:20 ` Andrew Schulman
2016-09-27 13:13   ` Andrey Repin
2016-09-27 14:48     ` Andrew Schulman
2016-09-27 15:14       ` Andrey Repin
2016-09-27 16:50     ` Linda Walsh
2016-09-27 17:12       ` Andrey Repin [this message]
2016-09-27 17:22         ` Linda Walsh
2016-09-28  4:17   ` Ernie Rael
2016-09-27 17:18 ` Achim Gratz

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=1373245590.20160927194222@yandex.ru \
    --to=anrdaemon@yandex.ru \
    --cc=cygwin@cygwin.com \
    --cc=cygwin@tlinx.org \
    /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).