Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!crdgw1!ge-dab.ge.com From: brooks@ge-dab.ge.com (Stephen Brooks) Newsgroups: comp.unix.questions Subject: Csh, alias substitution, & backslash Message-ID: <6663@ge-dab.ge.com> Date: 12 Nov 90 13:24:25 GMT Sender: news@ge-dab.ge.com Organization: General Electric SCSD, Daytona Beach FL Lines: 42 Nntp-Posting-Host: sundance7.dab.ge.com In the C-shell, you can prevent alias substitution by preceding the aliased command with a backslash. For example, you might have: % alias rm rm -i % alias cd cd !* ; pwd However, why does "\rm" work, but "\cd" does not? Yes, I realize that "cd" is a C-shell builtin command, but I haven't been able to find any discussion on how the \ prevents alias substitution. For example (using the above aliases): ==================== this does what I expect ==================== % ls file1 file2 file3 % rm * rm: remove file1? n rm: remove file1? n rm: remove file1? n % ls file1 file2 file3 % \rm * % ls % ==================== this does not do what I expect ==================== % cd /usr/users/steve % \cd cd: Command not found. So, why does the \ prevent the C-shell from recognizing the builtin command as well as preventing alias substitution? Feature? Bug? -- %% Stephen (Steve) M. Brooks %% brooks@ge-dab.ge.com %% %% GE Simulation & Control Systems %% ...!uunet!ge-dab.ge.com!brooks %% %% P.O. Box 2825, Rm. 1370 %% ...!uunet!sunny.dab.ge.com!brooks %% %% Daytona Beach, FL 32115-2825 %% voice: (904) 239-4855 %%