CompuServe Thread

#Directory Completer

18 messages in this thread
#128243From: John DraperJan 16, 1994 2:15 AM
In LIB 9: CDD.LHA/Bin Bytes: 2621 Title : Directory completer in Arexx Keywords: DIR DIRECTORY COMPLETE MARTENS REXX AREXX Tired of typing things like: cd Eskarina:Graphics/Imagine/Projects/Diamond.imp/1.pix/anim Here's a little Arexx script whith which you can enter d Es:g/i/p/d/1/a instead and get to the same directory.
#128270From: John Toebes/SYSOPJan 16, 1994 10:40 AM
This looks like an interesting Arexx script… In case people are not aware, under 2.0 it supports wild cards such that you could also type: cd eskarina:g#?/i#?/p#?/d#?/1#?/a#? I realize it is a little longer, but with stars enabled it means you don't have to worry about a new command in addition. Just a piece of information that most people don't seem to be aware of. — John A. Toebes, VIII — Obvious Implementations Corp. — Internet: toebes@oic.com
#128276From: John DraperJan 16, 1994 12:40 PM
And of course those of us with WShell also tend to use the filename completion, which is handy for files as well as directories. -larry
#128282From: John Toebes/SYSOPJan 16, 1994 1:20 PM
That goes without saying. Doesn't everyone use WShell and Display Handler? 🙂 😉 🙂 — John A. Toebes, VIII — Obvious Implementations Corp. — Internet: toebes@oic.com
#128320From: Paul IdolJan 16, 1994 6:25 PM
Display Handler? Rings a bell… what is it? Does WShell work on 1200/4000s? I have it, but I only used it back when, when I was using my 500. Paul
#128327From: John Toebes/SYSOPJan 16, 1994 7:45 PM
Display Handler is the best part of Bills Wshell 2.0 package. It has history, jumping, scroll back, and user programmable menus. Wshell works just about anywhere and is certainly worth the investment. Bill is on here somewhere… — John A. Toebes, VIII — Obvious Implementations Corp. — Internet: toebes@oic.com
#128365From: Paul IdolJan 17, 1994 12:08 AM
Right, right, stupid me – forgot it was his shell handler. Paul
#128396From: Brian BartlettJan 17, 1994 4:31 AM
John, not everyone. CShell here <g>. Brian bjbart@watserv.ucr.edu
#128298From: Quinten Martens [CSGR]Jan 16, 1994 3:50 PM
Larry, You're right, it works with wildcards too but I have thousands of directories and all you get is 'More than one directory matches' if you've got tons of directiries that start with the same letters. I like to be able to select the directory I want and I'm a lazy slug and try to avoid typing whenever possible. — Quinten
#128301From: John Toebes/SYSOPJan 16, 1994 4:34 PM
Interesting, if you get more than one directory match, how does the Arexx program select the right one? Given that we happen to have source code to the CD command (Doug Walker wrote it for 2.0), it is possible to enhance it to be more intelligent. Something like first match? — John A. Toebes, VIII — Obvious Implementations Corp. — Internet: toebes@oic.com
#128355From: Tom RobinsonJan 16, 1994 11:20 PM
> Given that we happen to have source code to the CD command > […] it is possible to enhance it Neat idea. How about presenting a numbered list of the directories found via wildcard to stdout and looking to stdin for a number to be entered by the user? 🙂 — Tom
#128401From: John Toebes/SYSOPJan 17, 1994 6:00 AM
That looks like it could work. Clearly there would have to be an option to control this (so that it knows it has an interactive console. I like this. I will pass it on to Doug, or see if I can attack it as soon as the current project is shipping. — John A. Toebes, VIII — Obvious Implementations Corp. — Internet: toebes@oic.com
#128465From: Tom RobinsonJan 17, 1994 8:05 PM
Sounds neat! I'll be glad to help beta test it. 🙂
#128391From: Quinten Martens [CSGR]Jan 17, 1994 3:25 AM
John, The script pops up a little window and lets you select a directory. — Quinten
#128397From: Brian BartlettJan 17, 1994 4:31 AM
John, the way CShell handles it is to change to each directory in turn. If I type 'cd ib#?' it'll go to the first match, then if I repeat the same command it will go to the next match. I just hit the up arrow and enter until I get the right directory. So, the idea isn't impossible. Brian bjbart@watserv.ucr.edu
#128402From: John Toebes/SYSOPJan 17, 1994 6:00 AM
Unfortunately that makes it a little non-predictable and requires saving additional state information within the context of the shell. I don't believe that we have the luxory of that. Or do I misunderstand the implementation? — John A. Toebes, VIII — Obvious Implementations Corp. — Internet: toebes@oic.com
#128512From: Brian BartlettJan 18, 1994 2:25 AM
I did some digging and I think I see where it's keeping the previous match, in _cwd. So, you'd need something like that. It also maintains a list of directories in a small database, something like Larry's find. Between those two, it manages.
#128575From: John Toebes/SYSOPJan 18, 1994 5:28 PM
I understand. The problem you run into that is that it falls into the creeping resources mode/dangling locks. Thanks. — John A. Toebes, VIII — Obvious Implementations Corp. — Internet: toebes@oic.com