yadav@andromeda.rutgers.edu.rutgers.edu (Ashish Yadav) (05/14/89)
Since folks have been talking about tcsh, I would like to know how I could get the current directory to be 'echo'ed in my prompt. We have tcsh running on a 9810x, just incase !! thanks. ____ ____ ____ _____ _____ Ashish Yadav ( President ) / / / / / / *************************** / / / /___ / / yadav@andromeda.rutgers.edu / / / / / / ayadav@topaz.rutgers.edu /____ /___/ ____/ __/__ __/__ ayadav@draco.BITNET
steve@polyslo.CalPoly.EDU (Steve DeJarnett) (05/15/89)
In article <May.14.12.32.41.1989.26428@galaxy.rutgers.edu> yadav@andromeda.rutgers.edu.UUCP (Ashish Yadav) writes: >Since folks have been talking about tcsh, I would like to know how I could >get the current directory to be 'echo'ed in my prompt. We have tcsh running >on a 9810x, just incase !! You can set your prompt, but it won't update when you move around. To get this, you need to change 'cd' (and popd and pushd) to reevaluate your $prompt variable everytime you move somewhere. Use this line to do that: alias cd 'chdir \!* ; set prompt = "\! $cwd -> " ; ls -FC' This one also does an ls after cd'ing there. Modify to suit. ------------------------------------------------------------------------------- | Steve DeJarnett | Smart Mailers -> steve@polyslo.CalPoly.EDU | | Computer Systems Lab | Dumb Mailers -> ..!ucbvax!voder!polyslo!steve | | Cal Poly State Univ. |------------------------------------------------| | San Luis Obispo, CA 93407 | BITNET = Because Idiots Type NETwork | -------------------------------------------------------------------------------
yadav@andromeda.rutgers.edu.rutgers.edu (Ashish Yadav) (05/15/89)
In article <11427@polyslo.CalPoly.EDU> steve@polyslo.CalPoly.EDU (Steve DeJarnett) writes: > You can set your prompt, but it won't update when you move around. >To get this, you need to change 'cd' (and popd and pushd) to reevaluate your >$prompt variable everytime you move somewhere. Use this line to do that: > > alias cd 'chdir \!* ; set prompt = "\! $cwd -> " ; ls -FC' Works Great !!!!!! thanx a lot ... Ash. ____ ____ ____ _____ _____ Ashish Yadav ( President ) / / / / / / *************************** / / / /___ / / yadav@andromeda.rutgers.edu / / / / / / ayadav@topaz.rutgers.edu /____ /___/ ____/ __/__ __/__ ayadav@draco.BITNET
paul@morganucodon.cis.ohio-state.edu (Paul Placeway) (05/16/89)
In article <11427@polyslo.CalPoly.EDU> steve@polyslo.CalPoly.EDU (Steve DeJarnett) writes:
alias cd 'chdir \!* ; set prompt = "\! $cwd -> " ; ls -FC'
If you are running the tcsh from Ohio State, it's much easier than
that. Just set your prompt to include either %. (for the last part of
the CWD), or %/ (for all of the CWD). See the man page for details.
I welcome suggestions and (especially) code for improvements....
-- Paul Placeway
Ohio State
sandra@pyrtech (Sandra Macika) (05/17/89)
In article <May.14.12.32.41.1989.26428@galaxy.rutgers.edu> yadav@andromeda.rutgers.edu.UUCP (Ashish Yadav) writes: >Since folks have been talking about tcsh, I would like to know how I could >get the current directory to be 'echo'ed in my prompt. We have tcsh running >on a 9810x, just incase !! > >thanks. > I have the following 4 lines in my .cshrc file. This puts the directory, history, and universe in my prompt. It also gives a directory listing whenever you change directories. "c" is used instead of "cd" to change directories. The directory is not shown in the prompt until the "c" command is executed. I execute "c" in my .login file. a u universe set prompt =\ "`u` (\!)--> " a c 'cd \!*; set prompt="`u` $cwd ( \! )--> " ; echo ; ls -F; echo ;' Hope this helps!!!!` Sandra