From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 14 Jul 2000 14:03:17 -0700 Message-Id: <200007142103.OAA06763@ohio.river.org> From: Richard Uhtenwoldt To: 9fans@cse.psu.edu Subject: [9fans] command history In-Reply-To: <200007141416.JAA16884@sch1.NCTR.FDA.GOV> References: <200007141416.JAA16884@sch1.NCTR.FDA.GOV> Topicbox-Message-UUID: dddb0156-eac8-11e9-9e20-41e7f4b1d025 Stephen C. Harris writes: >Anthony Sorace wrote: >> //is it possible to use history and command completion with rc? >> >> no. rc has neither of these functions. history is the job of the >> windowing system - simply snarf your previous commands, edit in >> place, send them down... it's much better than the history built >> into most shells > >Except if there's a lot of output, or you want to go back more than one >command, it's sometimes hard to find your previous command in the first >place. I'm a Plan 9 newbie, but in case no one else has any other suggestions I thought I'd mention ILE, which I learned of on the rc mailing list. ile lets you scroll line by line up and down the commandline history and also to search backwards through the history. on a user-interface note, the search command is modeless; in contrast, bash's search command (^s) is modal. ile has filename completion (it looks at Linux /proc to determine the shell's cwd), but of course we know that the Plan 9 way is not filename completion but rather, e.g., to get the name of the file in an Acme window where you can click on it with button 3 of the mouse. it also has a bunch of affordances --delete_word and such-- for editing a command line --a task that in the Plan 9 style is done with a mouse and Rio. on Linux, ile uses a pty. on Plan 9, ILE could modify the /dev/cons that rc sees. i.e., instead of rio invoking "rc", rio could invoke "ile;rc" where the only effect of the ile command is to bind /dev/cons to a fileserver which stores the commandline history and interprets the history-editing commands. that way, no modification to rc or rio would be needed: ile would "sit between" rio and rc. from the readme of "ile-linux.tgz": README FOR LINUX VERSION OF ile -- INPUT LINE EDITOR This is a port/enhancement of Rob Pendelton's ILE pty front end to the Linux OS. I myself mostly use it for 'rc' -- the unix port of the USL plan 9 shell -- because it has no builtin line editing, and for ash the excellent enhanced /bin/sh clone which also has no line editing. I used to use it for 'ftp', but then I got ncftp. I've found it to work more reliably than 'atty' another popular front end, though its source code is probably less modular. It is nearly seven years old (much older than Linux itself in fact ;-) but it works with Linux' pty's. I have a lot of ideas for enhancements, but I don't know if I'll get around to them. I call this the Linux version because it uses /proc/*/cwd for filename completions which is *much* cleaner than any other pty-front end has at present. (They mostly use generous assumptions that the underlying process is a shell and prints out prompts and can send codes in the prompts saying what the directory is, etc.) Charles Blake, 07/28/1994