Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:11 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

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 Kingdom
Posts: 4311
Posted: 01:07pm 26 May 2022
Copy link to clipboard 
Print this post

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: Canada
Posts: 1132
Posted: 11:11pm 26 May 2022
Copy link to clipboard 
Print this post

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: Netherlands
Posts: 5089
Posted: 09:03am 27 May 2022
Copy link to clipboard 
Print this post

@vegipete
That is not hard to do. Complete with END.
PicomiteVGA PETSCII ROBOTS
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025