New answers tagged tcsh
There are plenty of good reasons why it's not recommended to use csh or tcsh for scripting. That's one of those. To get the output of some command verbatim into a shell variable in tcsh, you need something like: set temp = "`(some command; echo .) | paste -d . - /dev/null`" set var = "" set nl = '\ ' foreach i ($temp:q) set var = $var:q$i:r:q$nl:q end ...
According to this question, you can achieve that by setting: set prompt = "%C3 %" This should show you last three directory names of your CWD, followed by a space and a percent sign.
Top 50 recent answers are included