 |
 |
terminal and ls -G issues
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Feb 2004
Location: texas
Status:
Offline
|
|
1) pressing pageup, pagedown, home or end in the terminal controls the scrolling of the buffer. i want it to send the actual pageup, pagedown, home and end key codes to the process running in the terminal (i.e. bash or vim). also, i noticed anywhere text is inputted in os x, the home and end keys do not work as expected.
2) ls -G prints incorrect colors. when i do an ls -G in my home dir, all dirs show up as blue, but one (out of many) perl scripts show up in red. no other file types get any color. what can i do to correct this?
this is my second day with a mac. i'm a linux user (redhat 9, fedora core 1).
thanks for the help.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2001
Status:
Offline
|
|
Originally posted by clockworks:
1) pressing pageup, pagedown, home or end in the terminal controls the scrolling of the buffer. i want it to send the actual pageup, pagedown, home and end key codes to the process running in the terminal (i.e. bash or vim). also, i noticed anywhere text is inputted in os x, the home and end keys do not work as expected.
You can delete or change the key associations in the window preferences of the terminal.
You probably expect Home and End to move to the beginning and end of a line, that is on a Mac usually done with Shift-Left/Right, in the terminal with default settings it's just Ctrl-A Ctrl-E though.
Originally posted by clockworks:
2) ls -G prints incorrect colors. when i do an ls -G in my home dir, all dirs show up as blue, but one (out of many) perl scripts show up in red. no other file types get any color. what can i do to correct this?
The standard colors are blue for directories, red for executables, purple for links. Read man ls for info on how to change that.
Originally posted by clockworks:
this is my second day with a mac. i'm a linux user (redhat 9, fedora core 1).
Congratulations to your Mac.
Originally posted by clockworks:
thanks for the help.
You are welcome. Questions like these might find open ears in the Unix forum here as well.
-
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Feb 2004
Location: texas
Status:
Offline
|
|
Originally posted by Moonray:
You can delete or change the key associations in the window preferences of the terminal.
You probably expect Home and End to move to the beginning and end of a line, that is on a Mac usually done with Shift-Left/Right, in the terminal with default settings it's just Ctrl-A Ctrl-E though.
The standard colors are blue for directories, red for executables, purple for links. Read man ls for info on how to change that.
Congratulations to your Mac. 
You are welcome. Questions like these might find open ears in the Unix forum here as well.
-
right, about the window prefs in terminal...what string should i send to the shell for each of those actions? there was one for shift page up and shift page down which does what i want for plain page up and page down, but when i copied them and tried it, pressing page up and page down resulted in the actual string "[6~]" being sent to the shell (i.e. it printed that string in the shell).
i thought i looked in the man pages for ls to see how to change the colors that are used with -G, but i'll look again.
thanks again.
p.s. my impressions so far are...i like KDE better. i'm big into tabs and so far, only safari supports tabs (unlike konsole, konqueror, kopete). i'm sure os x will grow on me...its just going to take a while to learn how to customize it to my liking...=)
EDIT: oh yeah, about the ls colors...you're only allowed to change the colors for dirs, symlinks, and executables. i like the gnu ls that lets you set colors for those, plus any type of file (by its extension)...=)
(Last edited by clockworks; Feb 12, 2004 at 03:07 PM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2001
Status:
Offline
|
|
Changing the key codes is a bit tricky there because the escape key is not shown in the list or in the input field. Both codes you want start with an escape character and would be shown in other places as ^[[5~ and ^[[6n. To enter the leading escape, follow the instructions above the input field, where for me the key combination option-control-[ seems to work better than the suggested option-esc.
If you want the Gnu ls, just install it, I myself never bothered about that many colors so I can't tell if there's a trick to get filaname-dependent coloring with the installed one.
And yes, on Macs having many windows is traditional, try to get used to hide Applications and windows you don't use or impress yourself with Exposé. I myself miss some kind of windowshade though.
-
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status:
Offline
|
|
*ahem* I use gnu coreutils in OS X, wouldn't have it any other way. 
|
"In Nomine Patris, Et Fili, Et Spiritus Sancti"
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2001
Location: Washington, DC
Status:
Offline
|
|
yeah, the GNU utils compile fine in OS X, and I prefer them
just install them to /usr/local/bin and place that before /usr/bin in your PATH. That way you don't destroy what's already there.
|
|
/Earth\ Mk\.\ I{2}/
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Feb 2004
Location: texas
Status:
Offline
|
|
Originally posted by Moonray:
Changing the key codes is a bit tricky there because the escape key is not shown in the list or in the input field. Both codes you want start with an escape character and would be shown in other places as ^[[5~ and ^[[6n. To enter the leading escape, follow the instructions above the input field, where for me the key combination option-control-[ seems to work better than the suggested option-esc.
If you want the Gnu ls, just install it, I myself never bothered about that many colors so I can't tell if there's a trick to get filaname-dependent coloring with the installed one.
And yes, on Macs having many windows is traditional, try to get used to hide Applications and windows you don't use or impress yourself with Exposé. I myself miss some kind of windowshade though.
-
thats odd, neither option-control-[ nor option-esc print anything in the input field (no escape code or anything).
hmm, i think i will install the gnu utils...
expose is pretty neat i have to admit. i found you can cycle thru terminal windows with cmd-{left arrow, right arrow}, so its not too much different than using tabs in konsole...=)
thanks for the replies.
EDIT: here is the solution to my problems:
http://www.macosxhints.com/article.p...40111081916984
(Last edited by clockworks; Feb 17, 2004 at 08:53 AM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2001
Status:
Offline
|
|
Originally posted by clockworks:
thats odd, neither option-control-[ nor option-esc print anything in the input field (no escape code or anything).
Yes, it does not show escape characters at all but remembers them. If the pbcopy trick works for you it's fine too.
-
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|