Re: Invisible Unix "Icon" File
Re: Invisible Unix "Icon" File
- Subject: Re: Invisible Unix "Icon" File
- From: "Mark J. Reed" <email@hidden>
- Date: Fri, 5 Nov 2010 11:18:09 -0400
On Fri, Nov 5, 2010 at 10:13 AM, Michael Wood <email@hidden> wrote:
> On 5 November 2010 15:29, Mark J. Reed <email@hidden> wrote:
>> When typing in Terminal you can reliably generate these characters by
>> actually holding down the control key and pressing the letter key, but
>> in other applications the keystrokes might be interpreted differently.
>
> In the Terminal, you might need to press Ctrl-V first to quote the
> next keystroke.
Only if you want to somehow enter them as literal characters on the
command line. But that's not what I'm talking about. My only point
was that control-M and return are interchangeable: if you type a
command, like "ls", and then press control-M, the command will run,
just as if you pressed the return key(*). Similarly, pressing
control-I will trigger tab-completion.
If for some reason you want to pass an argument to a command
containing a character that normally has some other effect, like
control-C or return or whatever, then yes, you press control-V first -
but again, control-V control-M has the same effect as control-V
return. Either will get you a '^M' displayed on the command line, and
bash will see a literal carriage return at that point once you submit
the command (by sending a return that's not quoted by control-V).
I was just pointing out that control characters really are
"control-key" characters, to illuminate the relationship between
return and the mysterious "M" in "^M".
--Mark
(*) Actually, returns get translated into linefeeds (control-J) before
the shell ever sees them. It's possible for this bit of automatic
processing to get turned off, in which case pressing return just puts
a ^M on the line instead of submitting the command, which can be
frustrating. The way to fix that (other than just closing the Terminal
window and opening a new one) is to type "stty sane" and then press
control-J.
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden