Go Back   The macosxhints Forums > OS X Help Requests > UNIX - General



Reply
 
Thread Tools Rate Thread Display Modes
Old 04-05-2002, 05:31 AM   #1
the_shrubber
Prospect
 
Join Date: Feb 2002
Posts: 48
Question csh navigation

Hi,

There are two things that i would like to do with tcsh, but i can't seem to make them work on the Mac:

1) search my command history... in bash, you hit control-r and type as much of the command as you remember: is there something like this?

2) hit control-left/right arrow to move between words on the command line... i thought you could use bindkey in the cshrc, along with escape codes for the arrow keys, but that doesn't seem to work.

Any ideas?
the_shrubber is offline   Reply With Quote
Old 04-05-2002, 10:59 AM   #2
mervTormel
League Commissioner
 
Join Date: Jan 2002
Posts: 5,536
i think this might give you search command history:

% bindkey -k down history-search-forward

% bindkey -k up history-search-backward
mervTormel is offline   Reply With Quote
Old 04-09-2002, 12:15 PM   #3
the_shrubber
Prospect
 
Join Date: Feb 2002
Posts: 48
thanks! going through my history will now be 10 times more comfortable.

any takers for the next/previous word bit?

there seem to be two problems:

1) doing ^v<control-right> and ^v<right> give the same code (^[[C)... so i can't really figure out if control-right is one of ^[OC ^[Oc... trial-error with vim, nothing seems to happen

2) tcsh seems to override some of the bindkey settings after you source your cshrc... if you type in the command or run source, the bindings work (but because of number 1, this only seems to work for the wrong key (<right>)

bah...
the_shrubber is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 10:48 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.