[net.unix-wizards] amusing hack in 4.1BSD C-shell

fred.umcp-cs@Udel-Relay@sri-unix (09/17/82)

From:     Fred Blonder <fred.umcp-cs@Udel-Relay>
Date:     13 Sep 82 18:58:39-EDT (Mon)
The C-shell can be made to display your current working directory in your
shell prompt by the following commands:

	alias cd 'if ("\!:0-$" == cd) cd; if ("\!:0-$" != cd) cd \!$; \
				set prompt = "[$cwd] ==> "'
	alias pushd 'if ("\!:0-$" == pushd) pushd; if ("\!:0-$" != pushd) \
				pushd \!$; set prompt = "[$cwd] ==> "'
	alias popd 'if ("\!:0-$" == popd) popd; if ("\!:0-$" != popd) \
				popd \!$; set prompt = "[$cwd] ==> "'

Sick huh? Useful too. (sometimes)