Re: First Pass at mintty documentation; etc.
Apologies for violating sane quoting convention, but I'm working off a crapberry. Wrt to window titles: change your PS1 prompt to no longer reassign the title with the pwd (assuming you still have the default definition from /etc/profile (or similar)) and use the same escape sequience it uses (a standard vt100 documented one) to explicity assign your own title. The same can be done within a native dos box, but the explicit assignment has to be through a binary that calls SetConsoleTitle() because the native terminal does not support the escape code (as I recall). - Original Message - From: cygwin-ow...@cygwin.com cygwin-ow...@cygwin.com To: cygwin@cygwin.com cygwin@cygwin.com Sent: Thu Jan 15 23:21:31 2009 Subject: Re: First Pass at mintty documentation; etc. Andy Koppe wrote: Lee D. Rothstein wrote: \e[1;5A: history-search-backward \e[1;5B: history-search-forward Perhaps I don't understand this 'bash' feature, but it doesn't seem to work for me. Start typing a command, press Ctrl-Up, and it finds the previous line in the history that started like that. I'll work on that habit. Thanks. I do lots of bash scripting including Windows/DOS commands, and I can think of only one character cell app that ever gave me any trouble from rxvt or xterm (whatever that app is -- I think a Resource Kit app), I found a work-around and never needed it again. 'net' is a troublesome command that's been mentioned, although it seems to be ok for basic stuff. But I guess there might be still be a few DOS fullscreen apps around. Turbo Pascal perhaps? But yeah, I'd sooner implement tabs than worry about DOS apps. ;) rudimentary 'net' works. I didn't know xterm actually had a UI for this. Do people find this useful? I've used it on occasion when I needed to scroll back through two debugging runs of a text-mode (character cell) app (or debugging statements). So your debug print macro or whatever would be switching screens? No. Me at the terminal switches screens, using the options menu, before the second run. What would be better for this and other problems, however, is a feature that I would love: The ability to interactively, on the fly change, the Title Bar/Task Bar Title to be clear on what each Window is doing. Can you explain the interactive bit a bit more. Do you mean clicking on the window title and start typing away at it? Exactly what I had in mine. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: First Pass at mintty documentation; etc.
Ashok Vadekar wrote: Apologies for violating sane quoting convention, but I'm working off a crapberry. Wrt to window titles: change your PS1 prompt to no longer reassign the title with the pwd (assuming you still have the default definition from /etc/profile (or similar)) and use the same escape sequience it uses (a standard vt100 documented one) to explicity assign your own title. I do that; doesn't fit that requirement. E.g: echo -ne \033]2;*** $* ***\007 The requirement?: VV Can you explain the interactive bit a bit more. Do you mean clicking on the window title and start typing away at it? Exactly what I had in mine. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: First Pass at mintty documentation; etc.
On Thu, Jan 15, 2009 at 1:02 AM, Andrew DeFaria wrote: In my 25 years of working on such systems I can probably count on 2 fingers the number of times such a situation has arose and what I did was Control-C then Control-R again. Sure. I'm not disagreeing; I was more looking for a plausible explanation than claiming necessity. But if you're going to claim 25 years, you're going back to the first version of ksh, which has some differences in history functionality that might affect the percentages here. :) -- Mark J. Reed markjr...@gmail.com -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: keycodes (was: Re: First Pass at mintty documentation; etc.)
On Thu, Jan 15, 2009 at 12:24 AM, Andy Koppe wrote: Speaking of history, does anyone know why xterm and rxvt diverged so much on modifier keycodes and why the xterm codes ended up being six characters long? Because rxvt failed to adhere to the relevant standards[1]. [1] http://www.ecma-international.org/publications/standards/Ecma-048.htm ~Matt -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: First Pass at mintty documentation; etc.
Andy Koppe wrote: Lee D. Rothstein wrote: \e[1;5A: history-search-backward \e[1;5B: history-search-forward Perhaps I don't understand this 'bash' feature, but it doesn't seem to work for me. Start typing a command, press Ctrl-Up, and it finds the previous line in the history that started like that. I'll work on that habit. Thanks. I do lots of bash scripting including Windows/DOS commands, and I can think of only one character cell app that ever gave me any trouble from rxvt or xterm (whatever that app is -- I think a Resource Kit app), I found a work-around and never needed it again. 'net' is a troublesome command that's been mentioned, although it seems to be ok for basic stuff. But I guess there might be still be a few DOS fullscreen apps around. Turbo Pascal perhaps? But yeah, I'd sooner implement tabs than worry about DOS apps. ;) rudimentary 'net' works. I didn't know xterm actually had a UI for this. Do people find this useful? I've used it on occasion when I needed to scroll back through two debugging runs of a text-mode (character cell) app (or debugging statements). So your debug print macro or whatever would be switching screens? No. Me at the terminal switches screens, using the options menu, before the second run. What would be better for this and other problems, however, is a feature that I would love: The ability to interactively, on the fly change, the Title Bar/Task Bar Title to be clear on what each Window is doing. Can you explain the interactive bit a bit more. Do you mean clicking on the window title and start typing away at it? Exactly what I had in mine. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: First Pass at mintty documentation; etc.
Andy Koppe wrote: Andy Koppe wrote: Lee D. Rothstein wrote: I do lots of bash scripting including Windows/DOS commands, and I can think of only one character cell app that ever gave me any trouble from rxvt or xterm (whatever that app is -- I think a Kit app), I found a work-around and never needed it again. 'net' is a troublesome command that's been mentioned, although it seems to be ok for basic stuff. But I guess there might be still be a few DOS fullscreen apps around. Turbo Pascal perhaps? But yeah, I'd sooner implement tabs than worry about DOS apps. ;) full screen or DOS is a red herring. Any program that does something like the following, if compiled as a native program, won't work in rxvt (or MinTTY, or cygwin/cmd-shell-with-CYGWIN=tty): #include stdio.h main() { int c; while ((c = getc(stdin)) != EOF) fputc(c, stdout); } The thing is, THIS program works as part of a pipeline even when compiled as a native program -- but it breaks if you try to use it interactively within rxvt/MinTTY/etc. A cygwin-compiled version works in all cases. -- Chuck -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ Nice example! Who is Chuck? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: First Pass at mintty documentation; etc.
Lee D. Rothstein wrote: Andy Koppe wrote: -- Chuck Nice example! Who is Chuck? Me. As I explained to Andy off-list, the 'Virtual Identify' Thunderbird plugin got kinda confused, and tried to pass off my email as if Andy had sent it. Bad Virtual Identity! No Cookie! -- Chuck -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: First Pass at mintty documentation; etc.
Lee D. Rothstein wrote: \e[1;5A: history-search-backward \e[1;5B: history-search-forward Perhaps I don't understand this 'bash' feature, but it doesn't seem to work for me. Start typing a command, press Ctrl-Up, and it finds the previous line in the history that started like that. I do lots of bash scripting including Windows/DOS commands, and I can think of only one character cell app that ever gave me any trouble from rxvt or xterm (whatever that app is -- I think a Resource Kit app), I found a work-around and never needed it again. 'net' is a troublesome command that's been mentioned, although it seems to be ok for basic stuff. But I guess there might be still be a few DOS fullscreen apps around. Turbo Pascal perhaps? But yeah, I'd sooner implement tabs than worry about DOS apps. ;) Isn't ANSI implementation required of virtual terminals? I know that later DEC VTs, and HP terminals (bless their expensive little scroll-back buffer hearts) had an ANSI mode. To be honest, I didn't really know what I was talking about there. Wouldn't surprise me though if MS had done their usual embraceextend trick on the ANSI stuff. I didn't know xterm actually had a UI for this. Do people find this useful? I've used it on occasion when I needed to scroll back through two debugging runs of a text-mode (character cell) app (or debugging statements). So your debug print macro or whatever would be switching screens? What would be better for this and other problems, however, is a feature that I would love: The ability to interactively, on the fly change, the Title Bar/Task Bar Title to be clear on what each Window is doing. Can you explain the interactive bit a bit more. Do you mean clicking on the window title and start typing away at it? Andy -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: First Pass at mintty documentation; etc.
Andy Koppe wrote: Lee D. Rothstein wrote: I do lots of bash scripting including Windows/DOS commands, and I can think of only one character cell app that ever gave me any trouble from rxvt or xterm (whatever that app is -- I think a Resource Kit app), I found a work-around and never needed it again. 'net' is a troublesome command that's been mentioned, although it seems to be ok for basic stuff. But I guess there might be still be a few DOS fullscreen apps around. Turbo Pascal perhaps? But yeah, I'd sooner implement tabs than worry about DOS apps. ;) full screen or DOS is a red herring. Any program that does something like the following, if compiled as a native program, won't work in rxvt (or MinTTY, or cygwin/cmd-shell-with-CYGWIN=tty): #include stdio.h main() { int c; while ((c = getc(stdin)) != EOF) fputc(c, stdout); } The thing is, THIS program works as part of a pipeline even when compiled as a native program -- but it breaks if you try to use it interactively within rxvt/MinTTY/etc. A cygwin-compiled version works in all cases. -- Chuck -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: First Pass at mintty documentation; etc.
Andy Koppe wrote: Lee D. Rothstein wrote: \e[1;5A: history-search-backward \e[1;5B: history-search-forward Perhaps I don't understand this 'bash' feature, but it doesn't seem to work for me. Start typing a command, press Ctrl-Up, and it finds the previous line in the history that started like that. Why not simply type Ctrl-R then the first few letters of a command (or some letters in the middle of a command). Works great! Requires no support from any terminal emulator... -- Andrew DeFaria http://defaria.com Old age is when you still have something on the ball but you are just too tired to bounce it. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: First Pass at mintty documentation; etc.
On Wed, Jan 14, 2009 at 10:18 PM, Andrew DeFaria wrote: Why not simply type Ctrl-R then the first few letters of a command (or some letters in the middle of a command). Works great! Requires no support from any terminal emulator... True, but that's only one direction of history search, albeit the most commonly useful one. For those cases where you're somewhere back in your history and need to search forward, what do you do? The default binding for history-search-forward is control-S; unfortunately, that's also usually the stop character and therefore caught by the terminal before bash ever sees it. So you have to either change the stop character or rebind the function, and if you rebind that one you might as well bind the other one to something symmetric. Also, while it's fun to customize things in .inputrc (I have mine set to editing-mode vi, in which incidentally the / key starts a history search), I do recommend that everyone learn the emacs keys just because that's what bash defaults to. Sure, if I'm going to be typing more than a couple commands in a foreign bash setup, the first one I type is set -o vi. But for short sessions in someone else's environment it's handy to be able to use the default bindings. -- Mark J. Reed markjr...@gmail.com -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
keycodes (was: Re: First Pass at mintty documentation; etc.)
Andrew DeFaria wrote: \e[1;5A: history-search-backward \e[1;5B: history-search-forward Perhaps I don't understand this 'bash' feature, but it doesn't seem to work for me. Start typing a command, press Ctrl-Up, and it finds the previous line in the history that started like that. Why not simply type Ctrl-R then the first few letters of a command (or some letters in the middle of a command). Works great! Requires no support from any terminal emulator... Yes, obviously you can bind the history search to any key you like. To do the same as above with rxvt: \eOa: history-search-backward \eOb: history-search-forward Speaking of history, does anyone know why xterm and rxvt diverged so much on modifier keycodes and why the xterm codes ended up being six characters long? Andy -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
console vs pty (was: Re: First Pass at mintty documentation; etc.)
Chuck Wilson wrote: full screen or DOS is a red herring. Any program that does something like the following, if compiled as a native program, won't work in rxvt (or MinTTY, or cygwin/cmd-shell-with-CYGWIN=tty): #include stdio.h main() { int c; while ((c = getc(stdin)) != EOF) fputc(c, stdout); } The thing is, THIS program works as part of a pipeline even when compiled as a native program -- but it breaks if you try to use it interactively within rxvt/MinTTY/etc. A cygwin-compiled version works in all cases. I see, thanks for explaining that. What exactly does happen when calling read() that means that pty input doesn't reach the program? Andy -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: console vs pty (was: Re: First Pass at mintty documentation; etc.)
On Thu, Jan 15, 2009 at 05:44:09AM +, Andy Koppe wrote: Chuck Wilson wrote: full screen or DOS is a red herring. Any program that does something like the following, if compiled as a native program, won't work in rxvt (or MinTTY, or cygwin/cmd-shell-with-CYGWIN=tty): #include stdio.h main() { int c; while ((c = getc(stdin)) != EOF) fputc(c, stdout); } The thing is, THIS program works as part of a pipeline even when compiled as a native program -- but it breaks if you try to use it interactively within rxvt/MinTTY/etc. A cygwin-compiled version works in all cases. I see, thanks for explaining that. What exactly does happen when calling read() that means that pty input doesn't reach the program? It's buffered differently. MSVCRT thinks that Cygwin's ptys are pipes so it buffers the input like a pipe rather than a terminal. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: First Pass at mintty documentation; etc.
Mark J. Reed wrote: True, but that's only one direction of history search, albeit the most commonly useful one. For those cases where you're somewhere back in your history and need to search forward, what do you do? In my 25 years of working on such systems I can probably count on 2 fingers the number of times such a situation has arose and what I did was Control-C then Control-R again. The default binding for history-search-forward is control-S; unfortunately, that's also usually the stop character and therefore caught by the terminal before bash ever sees it. So you have to either change the stop character or rebind the function, and if you rebind that one you might as well bind the other one to something symmetric. Again, if the need were more than 2 times in 25 years I'd probably just bind Control-E to it or something like that. Also, while it's fun to customize things in .inputrc (I have mine set to editing-mode vi, in which incidentally the / key starts a history search), I do recommend that everyone learn the emacs keys just because that's what bash defaults to. Sure, if I'm going to be typing more than a couple commands in a foreign bash setup, the first one I type is set -o vi. But for short sessions in someone else's environment it's handy to be able to use the default bindings. Hmmm... My usual inclination is to type set -o emacs when required! ;-) Different strokes... -- Andrew DeFaria http://defaria.com What do you do when you see an endangered animal that eats only endangered plants? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: First Pass at mintty documentation; etc.
Andy Koppe wrote: Lee D.Rothstein wrote: Hi, I've taken a first pass at distilling my experience with 'mintty' and the [ahem] discussion, here, about it into a text file (see attachment mintty.{h}) Thanks, that's a nice surprise! Okay, since you at least didn't hate it, I'll plug it into a 'man' template. I'll add additional stuff, as it becomes clear (such as the '.inputrc' stuff, here). Speed It's quite funny, I didn't realise that until people here pointed it out, probably because I didn't have to do anything to achieve it. :) Actually, it's surprising that I could notice it, at all. My new computer is a Gateway, running Vista 64b, and it's much () faster than the old one (less than a year old) that got zapped by lightning static (an HP [slow disk!!!], running Vista 32b, Intel Dual Core and 2/3 the RAM). Xterm was pretty much intolerably slow with the HP, but is quite peppy on the GW (AMD Quad Core). (The other nice things about Vista 64b are a practically unlimited command line, and much longer tolerated path names, ANAICT [as near as I can tell].) Actually, the only thing wrong with MinTTY, ANAICT, is the name. I would have preferred: CFFTTW (Cygwin's Fast F-ing Terminal That Works! ;-) CFFT, for short? The name would be in the tradition, for example, of MIT's node for documentation -- ftp://RTFM.mit.edu !) Best conformance to my personal expectation of what various directional keys (HOME, END, -, -, etc.) should do! (However, still bummed that CTRL-- CTRL-- do not move, respectively forward and back a word on the command line!) These two lines in .inputrc should do the trick: \e[1;5D: backward-word \e[1;5C: forward-word Thank you! And here's my favourite bash feature, mapped to Ctrl-Up/Down: \e[1;5A: history-search-backward \e[1;5B: history-search-forward Perhaps I don't understand this 'bash' feature, but it doesn't seem to work for me. * Futures expectation: My number one goal would be for it to replace the Cygwin console for everything, although I understand there are great difficulties with that goal. Hmm, yep, unfortunately the only path I can see towards that goal is to take Console2's approach of capturing a Windows console, and to try and make the cygwin terminal running inside it more standards-compliant, but that would still leave the slowness of the console and the lag caused by capturing its contents. Perhaps it would be possible to override and reimplement the Win32 console functions as listed at http://msdn.microsoft.com/en-us/library/ms682073(VS.85).aspx ? Do DOS software interrupts still work too? It would certainly be a huge amount of work though, which would include having to reimplement the console's ANSI emulation. I do lots of bash scripting including Windows/DOS commands, and I can think of only one character cell app that ever gave me any trouble from rxvt or xterm (whatever that app is -- I think a Resource Kit app), I found a work-around and never needed it again. Isn't ANSI implementation required of virtual terminals? I know that later DEC VTs, and HP terminals (bless their expensive little scroll-back buffer hearts) had an ANSI mode. Does Curses make this issue go away? Because of the nature of various discussion elements in wading through this stuff, I am referring to my documentation project as: *Diuretics*! *grin* BTW, that's why the signature was: L Dave Rothstein (as in L Ron Hubbard -- Dianetics! ;-)). @@ What alternate screen? @@ Good question. It's vt100 lingo for a second logical screen that wholescreen apps such as editors normally use, often through the (n)curses library. (I'm taking wholescreen to mean an app controlling the whole terminal screen, as opposed to the terminal window being in fullscreen mode.) = Is there an alternate screen toggle in 'mintty' as there is in 'xterm'? I didn't know xterm actually had a UI for this. Do people find this useful? I've used it on occasion when I needed to scroll back through two debugging runs of a text-mode (character cell) app (or debugging statements). What would be better for this and other problems, however, is a feature that I would love: The ability to interactively, on the fly change, the Title Bar/Task Bar Title to be clear on what each Window is doing. (I already know how to change the title from the command line, e.g.: echo -ne \033]2;*** $* ***\007 but that doesn't fill the need with an omnibus app/tool like virtual terminal.) The older I get the more I need this. I could actually use this on every Windows app, and perhaps on real life objects and conversations, as well! ;-) = How do you invoke it? You shouldn't need to really. Apps such as 'less' or 'vi' switch to it using the releavant vt100 incantation. Okay, I'll fix that. [about mousewheel scrolling in less] the feature doesn't work in Vista when the scrollbar is shown. Looks like the inactive scrollbar is swallowing