From: Andrey Repin <anrdaemon@yandex.ru>
To: Christoffer Aasted <chr.aasted@gmail.com>, cygwin@cygwin.com
Subject: Re: Windows shortcut "bash -c" the only way? Naturally it ignores profile and hence locale
Date: Thu, 02 Jun 2016 17:50:00 -0000 [thread overview]
Message-ID: <602832425.20160602204147@yandex.ru> (raw)
In-Reply-To: <CAM9yT0-Y7nJoHuQ_O=F_miMT8y+qAtKYnJA+ceF7DiX8wLwCvA@mail.gmail.com>
Greetings, Christoffer Aasted!
> Hello Cygwin.
> I struggle in creating a Windows shortcut that launches a command and
> initializes the environment the way that the Cygwin64 Terminal
> initializes.
> C:\cygwin64\bin\mintty.exe /bin/bash -l -c "set ssh -t cha@my.host
> screen -r -d weechat"
Why "set" ?
> I am aware that "bash -c" behaves much differently and does source
> $HOME shell customizations /etc/profile, .bash_profile, .profile -
> right?
> I thought "-l" login shell was the solution.
> I tried sourcing /etc/profile; .bash_profile and .profile but this
> doesn't make fix anything.
> C:\cygwin64\bin\mintty.exe /bin/bash -l -c "source /etc/profile; set
> ssh -t cha@my.host screen -r -d weechat"
> The issue is that LANG is not properly set and even if I set it
> manually before entering SSH with a "LANG=en_US.UTF-8" (where I know
> my host has the locales properly set).
> Why would we have to run "bash -c" on shortcuts ? Isn't sending a
> command to mintty.exe supported or is the culprit cygwin?
Normally, I just run shell scripts directly. (Well, almost.)
I don't understand your struggle. May be you should just remove "set" ?
--
With best regards,
Andrey Repin
Thursday, June 2, 2016 20:39:51
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
next prev parent reply other threads:[~2016-06-02 17:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-02 16:40 Christoffer Aasted
2016-06-02 17:50 ` Andrey Repin [this message]
2016-06-02 17:53 ` Christoffer Aasted
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=602832425.20160602204147@yandex.ru \
--to=anrdaemon@yandex.ru \
--cc=chr.aasted@gmail.com \
--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).