English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I want to create an "alias" in my .tcshrc file that will automatically "ls -altF" when I "cd." I'm using Mac OSX 10.4.2.
Thanks for your help!

2007-07-18 08:37:26 · 3 answers · asked by R.J. Macready 1 in Computers & Internet Programming & Design

3 answers

alias cd 'cd \!* ; ls -altF'

2007-07-18 09:38:25 · answer #1 · answered by McFate 7 · 1 0

I use ksh, but in tcsh there are a set of special aliases.
One of them is called cwdcmd and it will execute every time the current workind directory changes
so alias cwdcmd 'ls -altf' should give you the behavior you want, be careful of which direction 'ticks' you use, that will mess you up too

another more convential way of doing it is
alias cd 'ls -altf $1 ; /usr/bin/cd '
Depending on what shell you use, and where cd is located it might be slightly different.

2007-07-18 16:48:37 · answer #2 · answered by darcprowler 2 · 0 0

You are in the wrong place, go to a Linux forum.

2007-07-18 15:42:00 · answer #3 · answered by HockeyInJune 2 · 0 1

fedest.com, questions and answers