[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

productivity issue - unix shell

Posted on 2000-03-15
6
Medium Priority
?
293 Views
Last Modified: 2010-04-21
when typing commands in a unix shell e.g. tcsh, it is possible to go to the beginning by pressing Ctrl and 'a' at the same time.  Similarly, Ctrl and 'e' goes to the end of the line.  My question is: is it possible to go by word?  just like Ctrl and left arrow get me to the previous word.

thx in advance
0
Comment
Question by:crest
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 2623433
esc-f & esc-b should move forward & backward by words.
0
 

Author Comment

by:crest
ID: 2628380
that works!!
just wondering if there is any way you can assign esc-b to Ctrl + <-?
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2628612
Yep, you can. From the tcsh man page:

"Command-line  input can be edited using key sequences much
like those used in GNU Emacs  or  vi(1).   The  editor  is
active  only when the edit shell variable is set, which it is by default in interactive shells.  The bindkey  builtin
can  display  and  change  key  bindings."

If that isn't enough info, I can create an account that uses tcsh (I always use bash and have since the first version of it) and walk you through setting a binding.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:crest
ID: 2633263
that sounds a little bit complicated.
it would be very nice of you if you can show me how to do that step by step
0
 
LVL 40

Accepted Solution

by:
jlevie earned 400 total points
ID: 2633835
If you execute "bindkey | more" you can see the key bindings. The binding of esc-f (forward-word) and esc-b (backward-word) are represented in the list as "^[f" and "^[b", "^[" being the ASCII representation of ctrl-[ which is the same code as the esc key generates. While you can't bind ctrl->/ctrl-< to anything as that combination doesn't generate a control code as far as tcsh is concerned, you can pick other keys to bind. For instance; "bindkey -b ^F forward-word" changes the binding of ctrl-F from forward-char to forward-word. The old binding of forward-char is lost, but it's also bound to the right arrow key so that's not a big loss. You could do a similar thing with "bindkey -b ^B backward-word"

For these bindings to persist across logins, you'll want to add the commands to your .tcshrc file.

0
 

Author Comment

by:crest
ID: 2644650
it works very well
thanks
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question