Features of the TCSH Shell
In this article, I will describe some of the main features of TCSH, which I believe make it worth using as the primary log in shell. This article is not meant to persuade bash users to change. I've never used bash, so I know very little about it.
As some of you know, I've created a configuration tool called The Dotfile Generator, http://www.imada.ou.dk/~blackie/dotfile/, which can configure TCSH. I believe that this tool is very handy for getting the most out of TCSH without having to read the manual a couple of times. Therefore, I'll refer to this tool several times throughout this article to show how it can be used to set up TCSH.
The shell is your interface to executing programs, managing files and directories, etc. Though very few people are aware of it, they use the shell frequently in daily work, e.g., completing file names, using history substitution and aliases. The TCSH shell offers all of these features and a few more, which the average user seldom optimizes.
With a high knowledge of your shell's power, you can decrease the time you need to spend in the shell, and increase the time spent on original tasks.
An important feature used by almost all users of a shell is command line completion. With this feature you don't need to type all the letters of a file name—just the ambiguous ones. This means that if you wish to edit a file called file.txt, you may need to type only fi and press the TAB key, and the shell will type the rest of the file name for you.
Basically, one can use completion on files and directories. This means that you cannot use completion on host names, process IDs, options for a given program, etc. Another thing you cannot do with this type of completion is to complete directory names when typing the argument for the command cd.
In TCSH the completion mechanism is enhanced, so that it is possible to tell TCSH which list to use to complete a particular command. For example, you can tell TCSH to complete from a list of host names for the commands rlogin and ping. An alternative is to tell it to complete only on directories when the command is cd.
To configure user-defined completion using The Dotfile Generator (TDG), go to the TDG page completion -> userdefined; this will bring up a page which looks like Figure 1.
For the command name, you tell TDG which command you wish to define a completion for. In this example it is rm.
Next you have to tell TDG to which arguments to the command this completion applies. To do this, press the button labeled Position definition. This will bring up a page, which is split into two parts as shown in Figures 2 and 3.
In the first part, you tell TDG the position definition that should be defined from the index of the argument to be completed (i.e., the one where the TAB key is pressed). Here you can tell it that you wish to complete on the first argument, all the arguments except the first one, and so forth.
2066f3.gifFigure 3. TDG Pattern Definition Page
The alternative to “position-dependent completion” is “pattern-dependent completion”. This means that you can tell TDG that this completion should only apply if the current word, the previous word or the word before the previous word conform to a given pattern.
Now you have to tell TDG which list to complete from. To do this, press the button labeled List. This will bring up a page where you can select from a lot of different lists, e.g., aliases, user names or directories.
Four of the lists you can select from are Commands, Directories, File names and Text files. If you select one of these, only elements from that directory are used.
There are two ways to specify completion from a predefined list. One is to mark the option predefined list, and type all the options in this list.
This solution is a bad idea if the list is used in several places (e.g., a list of host names). In that case, one should select the list to be located in a variable, then set this variable in the .tcshrc file.
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?
|Dynamic DNS—an Object Lesson in Problem Solving||May 21, 2013|
|Using Salt Stack and Vagrant for Drupal Development||May 20, 2013|
|Making Linux and Android Get Along (It's Not as Hard as It Sounds)||May 16, 2013|
|Drupal Is a Framework: Why Everyone Needs to Understand This||May 15, 2013|
|Home, My Backup Data Center||May 13, 2013|
|Non-Linux FOSS: Seashore||May 10, 2013|
- Dynamic DNS—an Object Lesson in Problem Solving
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- Validate an E-Mail Address with PHP, the Right Way
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- The Secret Password Is...
- Download the Free Red Hat White Paper "Using an Open Source Framework to Catch the Bad Guy"
- New Products
3 hours 54 min ago
- Keeping track of IP address
5 hours 45 min ago
- Roll your own dynamic dns
10 hours 59 min ago
- Please correct the URL for Salt Stack's web site
14 hours 10 min ago
- Android is Linux -- why no better inter-operation
16 hours 25 min ago
- Connecting Android device to desktop Linux via USB
16 hours 54 min ago
- Find new cell phone and tablet pc
17 hours 52 min ago
19 hours 21 min ago
- Automatically updating Guest Additions
20 hours 29 min ago
- I like your topic on android
21 hours 16 min ago