![]() |
Forum Index : Microcontroller and PC projects : MMBasic: how should path completion interact with SEARCH PATH
Author | Message | ||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
Hi folks, I'm seeking some opinions. Assumption 1: MMBasic has pathname completion at the command prompt - It doesn't (except for in a few hours my MMB4L alpha 5 branch), and Peter I'm not asking you to implement it, but if you watch this space for long enough then will hopefully provide an implementation you could adopt for the PicoMite; assuming that is there is any space left in the firmware to play with. i.e. If you write a half formed filename/path and press <TAB> then instead of inserting spaces MMBasic would insert as much of the filename as could be unambiguously determined. e.g. If the current working directory only contains the files "foo.bas" and "foo.inc" and you type: > RUN "fo<TAB> then MMBasic would helpfully fill in: > RUN "foo. Assumption 2: We are on an MMBasic platform that implements OPTION SEARCH PATH, i.e. CMM2, MMB4L or MMB4W. Now the question: How should pathname completion interact with OPTION SEARCH PATH ? Presumably if it interacts at all it would only interact if the user was typing a RUN or * command (or in MMB4L a LOAD or LIST FLASH command) as these are the only ones that respect the SEARCH PATH. Given that, should the contents of SEARCH PATH be considered when performing path completion, or would that be confusing ? e.g. If the directory identified by SEARCH PATH contains "foo.bas", "foob.bas" and the current working directory contains "foobar.bas" and the user types: RUN "fo<TAB> Should it respect the SEARCH PATH and complete to: RUN "foo or ignore the SEARCH PATH and complete to: RUN "foobar.bas Best wishes, Tom Edited 2022-05-26 23:18 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
vegipete![]() Guru ![]() Joined: 29/01/2013 Location: CanadaPosts: 1132 |
TAB ignores the search path, SHIFT-TAB respects the search path. While you are on this completion path, could you apply it to program editing too? Ie, I type the first few characters of my program, and it completes the rest of the program? ;-) Visit Vegipete's *Mite Library for cool programs. |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5089 |
@vegipete That is not hard to do. Complete with END. PicomiteVGA PETSCII ROBOTS |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |