# Command line tcsh



## Froma (Dec 21, 2008)

I have FreeBSD 6.4.

Try to configurate tcsh.

PWD=root. Write string in file .cshrc:
<set prompt="{`pwd`:!} ">

After reboot appears command line <{root:100}>
Enter command<cd cdrom> but command line does not changes at  
 <{root/cdrom:1xx}>.


----------



## ale (Dec 21, 2008)

Is this what you want?

```
set prompt={%/:!}
```


----------



## Froma (Dec 21, 2008)

Yes.That that is necessary.

But what mistake in my example ?

ex:<set prompt="{`pwd`:!} ">


----------



## ale (Dec 21, 2008)

`pwd` is evaluated once, when the shell starts and read its configuration.
That's why it is always /root for root or /usr/home/$USER for the other users.


----------



## Djn (Dec 21, 2008)

I believe you can play with setting _precmd_ to get the result you're looking for, though.


----------



## SirDice (Dec 22, 2008)

Here's my relevant bit from ~/.cshrc:


```
switch($TERM)
	case "xterm*":
		setenv TITLE "%{\033]0;%n@%m:%~\007%}"
		breaksw
	default:
		setenv TITLE ""
		breaksw
endsw

set prompt = "${TITLE}%n@%m:%~%#"
```

You don't have to use that ${TITLE} bit. It sets the xterm title bar (or putty) to username@hostnameath.


----------

