Skip to Content
Using csh & tcsh
book

Using csh & tcsh

by Paul DuBois
July 1995
Beginner to intermediate
244 pages
5h 58m
English
O'Reilly Media, Inc.
Content preview from Using csh & tcsh

Command Editing in tcsh

tcsh lets you interactively browse up and down through your history list, selecting and editing commands before executing them.

Use CTRL-P and CTRL-N (or up arrow and down arrow) to move up and down through your history list. Each recalled command is displayed on the current command line. To execute the command, hit RETURN. To cancel it, hit CTRL-C.

To edit commands, tcsh provides a command line editor that uses emacs-like or vi-like key bindings. Select the appropriate set using bindkey -e or bindkey -v. Some of the most useful editing commands are shown in the rest of this section. (Use bindkey with no arguments to see all your key bindings.)

emacs Mode Editing Commands

In emacs mode, characters are inserted into the command line unless they are editing commands. You can move the cursor or delete characters using the commands shown below.

Table B-1. Cursor motion commands

Command

Description

CTRL-B

Move cursor back (left) one character

CTRL-F

Move cursor forward (right) one character

ESC b

Move cursor back one word

ESC f

Move cursor forward one word

CTRL-A

Move cursor to beginning of line

CTRL-E

Move cursor to end of line

Table B-2. Text deletion commands

Command

Description

DEL or CTRL-H

Delete character to left of cursor

CTRL-D

Delete character under cursor

ESC d

Delete word

ESC DEL or ESC CTRL-H

Delete word backward

CTRL-K

Delete from cursor to end of line

CTRL-U

Delete entire line

Preceding a command with ESC n repeats the command n times.

To search up through your history list for a ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Linux Shells by Example

Linux Shells by Example

Ellie Quigley
Perl Cookbook

Perl Cookbook

Tom Christiansen, Nathan Torkington

Publisher Resources

ISBN: 9781449377526Errata Page