O'Reilly logo

Mac OS X in a Nutshell by Chris Stone, Chuck Toporek, Jason McIntosh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Command-Line Manipulation

tcsh offers a certain amount of functionality in manipulating the command line. Both shells offer word or command completion, and tcsh allows you to edit a command line.

Completion

tcsh provides word completion when the Tab key is hit. If the completion is ambiguous (i.e., more than one file matches the provided string), the shell completes as much as possible and beeps to notify you that the completion is not finished. You may request a list of possible completions with Control-D. tcsh also notifies you when a completion is finished by appending a space to complete filenames or commands and a / to complete directories.

Both csh and tcsh recognize ~ notation for home directories. The shells assume that words at the beginning of a line and subsequent to |, &, ;, ||, or && are commands and modify their search paths appropriately. Completion can be done mid-word; only the letters to the left of the prompt are checked for completion.

Related Shell Variables

  • autolist

  • fignore

  • listmax

  • listmaxrows

Related Command-Line Editor Commands

  • complete-word-back

  • complete-word-forward

  • expand-glob

  • list-glob

Related Shell built-ins

  • complete

  • uncomplete

Command-Line Editing with tcsh

tcsh lets you move your cursor around in the command line, editing the line as you type. There are two main modes for editing the command line, based on the two most common text editors: Emacs and vi. Emacs mode is the default; you can switch between the modes with:

bindkey -e     Select ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required