command completion project

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

command completion project

Richard Crozier
Dear Sudeempam,

The command completion project sounds pretty nice, but I do have one
suggestion, how about fixing basic command completion for packages as
part of the project too?

Command completion currently doesn't work for code in packages (by which
I mean namespaces created by putting code in a folder starting with
'+'). So if you put a function file myfunction.m in a folder like
'+mypackage', you then call it on the command line like:

mypackage.myfunction

you can also nest package folders so it's like:

my_package.my_sub_package1.myfunction

my_package.my_sub_package2.myfunction

but Octave can't currently do code completion on the package namespaces
as you type them. Ideally it should complete the first package name,
then after the dot, suggest any subpackage names or functions in the
package etc.

Regards,

Richard



--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


Reply | Threaded
Open this post in threaded view
|

Re: command completion project

Sudeepam Pandey


On 16 May 2018 4:23 p.m., "Richard Crozier" <[hidden email]> wrote:
Dear Sudeempam,

The command completion project sounds pretty nice, but I do have one suggestion, how about fixing basic command completion for packages as part of the project too?

Command completion currently doesn't work for code in packages (by which I mean namespaces created by putting code in a folder starting with '+'). So if you put a function file myfunction.m in a folder like '+mypackage', you then call it on the command line like:

mypackage.myfunction

you can also nest package folders so it's like:

my_package.my_sub_package1.myfunction

my_package.my_sub_package2.myfunction

but Octave can't currently do code completion on the package namespaces as you type them. Ideally it should complete the first package name, then after the dot, suggest any subpackage names or functions in the package etc.

Regards,

Richard



--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


Thanks for the suggestions Richard. I'll check it out in a few days and get back to you with a more detailed reply.

Just for clearance, I hope you are using the term 'command completion' as a substitute for the term 'command suggestion' here? 

I have genrally used the term 'command completion' to refer to the autocomplete feature (such as by pressing tab) and not to the suggestion feature that I am working on (which would generate possible corrections for typing errors) and so I would like to make sure that we are talking about the same things here.