DaemonForums  

Go Back   DaemonForums > Miscellaneous > Guides

Guides All Guides and HOWTO's.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 2nd May 2008
anomie's Avatar
anomie anomie is offline
Local
 
Join Date: Apr 2008
Location: Texas
Posts: 446
Thanked 69 Times in 46 Posts
Default Quick, simple tcsh tips for beginners

New to tcsh? Already familiar with bash? Sure, you could easily read through the manpages for tcsh(1), but here are a few quick and easy tips to help you feel right at home.

-----------------------------------------

Enable Tab command completion
One approach (or simply edit with your favorite editor):
Code:
echo 'set autolist' >> ~/.cshrc
Colorize your ls output
Use this (or simply edit with your favorite editor):
Code:
echo 'setenv CLICOLOR' >> ~/.cshrc
Source a file in to your environment
In Bourne shells (like bash), this is accomplished using:
Code:
. file_here
In csh / tcsh shells, this is accomplished using (logically enough):
Code:
source file_here
You'll need to do that to source in your ~/.cshrc changes, so now is a good time to practice!

Jump around the command line
So, you typed a long command (but haven't hit enter yet), and now you need get back to the very beginning of the command line -- simple: use Ctrl + A.

Now you fixed that typo at the very beginning of the command line, and you want to get back to the end of it to keep typing -- simple: use Ctrl + E.

Write a script that utilizes your cool new tcsh shell
I had to tack this one on, just in case.

Use Bourne shells for scripting. Do not use csh / tcsh for scripting. The reasons are exhaustively enumerated here:

http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/

-----------------------------------------

Hopefully these tips have just made you slightly more productive within tcsh. Have fun with your new shell!
__________________
Kill your t.v.

Last edited by anomie; 2nd May 2008 at 03:48 PM.
Reply With Quote
 

Tags
completion, csh, tab, tcsh

Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
A simple question Mr-Biscuit Off-Topic 1 16th April 2009 04:26 PM
History not saved in tcsh RandomSF FreeBSD General 8 9th December 2008 11:59 PM
Simple Firewall with PF jones FreeBSD General 3 7th November 2008 02:02 AM
TCSH: 'set promptchars' not effecting su like it should JMJ_coder General software and network 4 9th July 2008 09:51 PM
TCSH - getting to start of line maxrussell FreeBSD General 3 4th July 2008 11:55 AM


All times are GMT. The time now is 12:38 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick