Richard Haney wrote:
> I have tried using Msys 1.0.8 in the past and have just now tried
> using Msys 1.0.10, but what originally persuaded me to continue with
> Cygwin bash is the fact that there is no obvious way to set the
> default window parameters for the Msys bash shell.
Others have already suggested the elimination of rxvt, either using
MSYS-1.0.11's `--norxvt' option, or by deleting/renaming rxvt.exe in
the MSYS /bin directory; this lets you run the MSYS bash shell in a
native Woe32 console, which is what you get by default with Cygwin.
> The Cygwin bash window's system menu (obtained by clicking on the
> icon in the upper lest corner) has a "Defaults" menu item that allows
> setting the default window size...
That's nothing peculiar to Cygwin, nor even provided by Cygwin; it is
simply the standard Woe32 native console window behaviour.
Julien Lecomte replied:
>> Also, I would like to know how I can insert text from the clipboard
>> and how I can at least instantly move the cursor to the beginning or
>> the end of the current command line. And if more refined cursor
>> keyboard control is available, I'd like to know about that as well.
For `copy-and-paste', I use the mouse. In the `Properties' dialogue
for that native console window, under the `Options' tab, select both
`Quick Edit Mode' and `Insert Mode'. Now, hold the left button and
drag the mouse to highlight text; while it remains highlighted, a
single click of the right button copies it to the clipboard, and
subsequent right button clicks paste it, as many times as you like,
at the cursor position.
>> More refined command-line controls such as the Windows ("DOS")
>> command-line-shell's "Ctrl+'right_arrow'" or "Ctrl+'left_arrow'"
>> to skip groups of characters would also be nice (even in the
>> Cygwin shell as well).
>> Is that possible?
> Yes, by using inputrc files.
That's certainly the generic way to do it, providing settings which
propagate to all installed `readline' aware apps--which in the MSYS
world, are few and far between.
For settings which you would prefer to restrict to the shell, you
can also use the built-in `bind' command; e.g. I have the following
in my ~/.bashrc, (which I source from my ~/.profile):
bind 'set completion-ignore-case on'
> I've pasted the contents of my /etc/inputrc and ~/.inputrc files
> [snipped]. They aren't perfect, "delete" key doesn't delete,
You can use `cat -v', to check what the appropriate keyboard scan
code is. In my case, when I hit the `delete' key, followed by the
<RETURN> key, I see:
$ cat -v
(Check the codes for other keys, by hitting each in turn, with each
followed by <RETURN>; hit <CTRL-D> when done).
Now, the `^[' represents the ASCII <ESC> code, while the `[3~' simply
represents the three byte sequence of their respective ASCII codes.
Thus, I deduce the `.inputrc' or `bind' configuration string:
which makes the `delete' key work for me.
> but the "home" and "end" keys work.
As they do for me, with the configuration:
> They are a good starting point to have similar behavior between
> console and rxvt.
My other configuration settings are:
bind 'set completion-ignore-case on'
to make <TAB> completion work in the most logical fashion, on the
Woe32 case-insensitive file system, and:
to emulate the history search behaviour of the `4DOS' shell I used
at one time with MS-DOS: type the first few characters of a command,
then use <Cursor-Up> and <Cursor-Down> to find and replay matching
commands in the history.
You will also find that the standard `readline' <CTRL> and <ESC>
sequences work, without any additional configuration, e.g.:
<CTRL-K> deletes from cursor to end of line
<CTRL-U> deletes from cursor to beginning of line
<ESC>-<F> move cursor to end of word
<ESC>-<B> move cursor to beginning of word
<ESC>-<D> delete from cursor to end of word
among others; try `bind -p' to see what's currently mapped, and
Google for `readline' documentation, for an explanation of the