Xref: utzoo comp.unix.xenix:2432 comp.unix.questions:7478 Path: utzoo!dciem!nrcaer!scs!spl1!laidbak!att!ulysses!hector!ekrell From: ekrell@hector.UUCP (Eduardo Krell) Newsgroups: comp.unix.xenix,comp.unix.questions Subject: Re: "cd path" strangeness Message-ID: <10352@ulysses.homer.nj.att.com> Date: 5 Jun 88 01:01:51 GMT Article-I.D.: ulysses.10352 References: <337@vector.UUCP> Sender: netnews@ulysses.homer.nj.att.com Reply-To: ekrell@hector (Eduardo Krell) Organization: AT&T Bell Labs, Murray Hill Lines: 19 In article <337@vector.UUCP> chip@vector.UUCP (Chip Rosenthal) writes: >Here is a wierd one. In csh, move to some directory which doesn't have >a "path" subdirectory. Then type either "cd path" or "chdir path". >The expected response would be "path: No such file or directory." Instead, >no message is issued, and either you stay where you were or you move to >$path[1]. This behavior is independant of the definition of "cdpath" (or >lack of definition). This is documented in the man page for csh (at least in 4.3 BSD). When everything else fails, cd checks to see whether there's an environment variable whose name is the same as the argument you typed. If the value of that variable is a string and starts with a "/", then it takes that as the directory to cd to. Eduardo Krell AT&T Bell Laboratories, Murray Hill, NJ UUCP: {ihnp4,ucbvax}!ulysses!ekrell ARPA: ekrell@ulysses.att.com