Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!husc6!seismo!rochester!pt.cs.cmu.edu!h.cs.cmu.edu!cef From: cef@h.cs.cmu.edu.UUCP Newsgroups: comp.emacs Subject: Re: file completion in the shell buffer Message-ID: <1047@h.cs.cmu.edu> Date: Fri, 20-Mar-87 14:15:12 EST Article-I.D.: h.1047 Posted: Fri Mar 20 14:15:12 1987 Date-Received: Sun, 22-Mar-87 15:43:00 EST References: <8703201627.AA19093@arthur.cs.purdue.edu> Organization: Carnegie-Mellon University, CS/RI Lines: 43 Summary: It can be done. I just tried the following two things: (send-string "shell" "\el") and (send-string "shell" "B\e\e"). In my shell, esc-l gives a listing of all files starting with the word before the point, esc-esc does nme completion. The first form returned just what 'ls ' would have; the correct result. The second also worked right and put 'BlindBox' at the point. So, it seems that it can be done. One would have to write a command that grabs the current input line (there is some varaible in shell.el that points to it I believe), and does the following: (send-string "shell" (format "%s\e" input-line)) ;for your shell (send-string "shell" (format "%s\el" input-line)) ;for my shell (send-string "shell" (format "%s\e\e" input-line)) ;for my shell One aside about "my" shell. I run the csh with the shell variable 'editmode' set to 'emacs'. Theses added bit of functionality may however be just a local CMU mod, I know some guy here wrote a much spiffier C-shell and these bells might be part of it. At any rate, I don't see why the above solution shouldn't work (I havn't tried writting the thing YET). It seems like about 15 minutes of work to do this. Most of the time is in checking the shell.el file to see how to grab the current line. One should also check what ramifications a command like our '\el' command would have. After executing this command, the shell puts the line just typed after the prompt. I don't THINK there will be any problems with the real start of input being set correctly but you might want to check it out anyways (probably looking at the value of the start of input variable and making sure it is correct will be sufficient). Good Luck Chuck (Fineman) [cef@h!seismo]