0

I'm trying out the Hamilton C Shell but I haven't been able to make it run interactively with mintty.

I've tried running it from Cygwin:

$ /cygdrive/c/Program\ Files/Hamilton\ C\ shell\ 2012\ x64\ Demo/Bin/csh.exe

And also from cmd.exe:

> C:\tools\cygwin\bin\mintty.exe -e "C:\Program Files\Hamilton C shell 2012 x64 Demo\Bin\csh.exe"

I've used -i, -l, -X and -u flags (and without them too) but none of them seem to work, I only get the copyright message but I never get to the prompt:

Hamilton C shell(tm) x64 Release 5.2.g Demo
Copyright (c) 1988-2017 by Hamilton Laboratories.  All rights reserved.
1

You're not getting a prompt because mintty creates a pipe to the C shell, meaning the C shell doesn't know it's being run interactively. Hamilton C shell's -i command line option will tell it that it's running interactively even if it's not reading from a keyboard. For example, assuming mintty is on the search path, type mintty csh -i from Hamilton C shell's command line and you'll see the C shell's prompts in the mintty window.

For more, you may find Using Hamilton C shell with Cygwin helpful.

I'm the author of Hamilton C shell, so if you have other questions, let me know and I'll be happy to try to help. I may not always see a question posted here but I do respond to email.

  • 1
    Hello Nicole, I tried the flag but I don't get to the prompt. Could it be because I'm using the demo or should it work OK? – ArthurChamz Nov 10 '17 at 13:15
  • Ah, sorry! You're right! I just tried starting the demo version with mintty and I now see the behavior you experience. The reason it's hanging is because it's trying to post its nagware popups, looking for you press keys to make them go away. It tries reading them directly using the Win32 keyboard APIs and cannot be redirected to a pipe. If you start it with "-iQ", adding the -Q option to skip the opening banner and (shh! :) the nagware prompts, it works. – Nicole Hamilton Nov 10 '17 at 14:28
  • Be aware that the way mintty uses pipes to talk to anything it runs means it breaks anything that tries to use the keyboard and console APIs in Windows. For example, vim won't run at all under mintty and neither will my more utilty. – Nicole Hamilton Nov 10 '17 at 14:34
  • Thanks, I was able to give it a try now and it's as you mention, there's stuff that breaks (like tab completion). Would've been nice but I understand the implications. Nice job on the shell, it's quite nice! – ArthurChamz Nov 10 '17 at 15:29
  • Thank you. Perhaps you might try the command line editing and filename completion features built natively into the C shell and see what you think. – Nicole Hamilton Nov 10 '17 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.