3 # Copyright 2005 Sun Microsystems, Inc. All rights reserved.
4 # Use is subject to license terms.
6 # Copyright (c) 1980 Regents of the University of California.
7 # All rights reserved. The Berkeley Software License Agreement
8 # specifies the terms and conditions for redistribution.
10 #ident "%Z%%M% %I% %E% SMI"
12 # which : tells you which program you get
14 # Set prompt so .cshrc will think we're interactive and set aliases.
15 # Save and restore path to prevent .cshrc from messing it up.
16 set _which_saved_path_
= ( $path )
18 if ( -r ~
/.cshrc
&& -f ~
/.cshrc
) source ~
/.cshrc
19 set path
= ( $_which_saved_path_ )
20 unset prompt _which_saved_path_
24 set alius
= `alias $arg`
32 echo ${arg}: " " aliased to
$alius
36 if ( "$arg:h" != "$arg:t" ) then # head != tail, don't search
37 if ( -e $arg ) then # just do simple lookup
46 if ( -x $i/$arg && ! -d $i/$arg ) then