public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@Shaw.ca>
To: cygwin@cygwin.com
Cc: Martin Wege <martin.l.wege@gmail.com>
Subject: Re: Entering Cygwin command line (bash login) from Windows cmd.exe ?
Date: Mon, 14 Aug 2023 01:35:02 -0600	[thread overview]
Message-ID: <c084d815-9c5e-f8a4-e775-008cd56de99a@Shaw.ca> (raw)
In-Reply-To: <CANH4o6NBZwGGsqtS_79d0Hpf0r3ZnSNQu46EtCKEkX4KreNU+A@mail.gmail.com>

On 2023-08-13 11:40, Martin Wege via Cygwin wrote:
> On Sun, Aug 13, 2023 at 12:53 AM Roland Mainz via Cygwin wrote:
>> On Mon, Aug 7, 2023 at 7:38 AM KAVALAGIOS Panagiotis (EEAS) via Cygwin wrote:
>>>> On Sat, Jul 29, 2023 at 6:18 AM Roland Mainz wrote:
>>>>> Is there an official way to enter the Cygwin command line (e.g. bash
>>>>> login) from Windows cmd.exe, e.g. if someone ssh's into a Windows
>>>>> machine he/she ends/up in a cmd.exe and not bash...

>>> You may run your favourite shell from the bin directory of your Cygwin installation:
>>> "C:\Program Files\Cygwin\bin\bash.exe"
>>> "C:\Program Files\Cygwin\bin\tcsh.exe"
>>> replace " C:\Program Files" with your target Cygwin installation directory root.

>> Turns out my problem was simply that I forgot that just typing "bash"
>> only gives me an interactive shell, which sources only the interactive
>> shell configs (e.g. /etc/ksh.kshrc + ~/.kshrc for ksh93, and
>> /etc/bash.bashrc + ~/.bashrc for bash), but not the login configs
>> (e.g. /etc/profile + ~/.profile).
>> So the simple fix was just to type:
>> C:\Program Files\Cygwin\bin\bash.exe --login
>> or
>> C:\Program Files\Cygwin\bin\ksh93.exe --login
>> P.S.: Which reminds me - is there a way to contribute a Cygwin ksh93 package ?

> We would greatly appreciate a Korn Shell 93 package, preferably with
> some POSIX builtin commands.

$ cygcheck -p Korn
Found 6 matches for Korn
mksh-53a-1-src - mksh-src: MirBSD Korn Shell (source)
mksh-54-1-src - mksh-src: MirBSD Korn Shell (source)
mksh-56c-1-src - mksh-src: MirBSD Korn Shell (source)
mksh-53a-1 - mksh: MirBSD Korn Shell
mksh-54-1 - mksh: MirBSD Korn Shell
mksh-56c-1 - mksh: MirBSD Korn Shell

https://cygwin.com/packages/summary/mksh-src.html

POSIX only standardizes the POSIX shell sh (install man-pages-posix for docs).
Cygwin provides the dash POSIX compatible shell preinstalled as a base package.

Each shell provides its own builtins which may be similar, or have differnet 
names, and sufficient differences, to keep shell programmers in a job.

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

  reply	other threads:[~2023-08-14  7:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-29  4:18 Roland Mainz
2023-08-07  4:02 ` Roland Mainz
2023-08-07  5:38   ` KAVALAGIOS Panagiotis (EEAS)
2023-08-12 22:52     ` Roland Mainz
2023-08-13 14:04       ` Jon Turney
2023-08-13 17:40       ` Martin Wege
2023-08-14  7:35         ` Brian Inglis [this message]
2023-08-14  9:04           ` Martin Wege
2023-08-07 17:39   ` Lee
2023-08-08  7:01   ` Thomas Wolff
2023-08-08 15:44     ` ASSI

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=c084d815-9c5e-f8a4-e775-008cd56de99a@Shaw.ca \
    --to=brian.inglis@shaw.ca \
    --cc=cygwin@cygwin.com \
    --cc=martin.l.wege@gmail.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).