Please add Closing Parenthesis

Dear All Octave Authors,
I have installed Octave v5.2 for windows and find that it is very strong.

May I give a little bit suggestion:
Whenever we input an open parenthesis, can you make Octave to add its close parenthesis as well? For example,

MATLAB has this feature and it is very convenient.

Thanks for your attention. :slightly_smiling_face:

This is also a behavior in GNU Maxima (well, at least the wxMaxima frontend). It is useful once you get used to it, but very annoying if you are not :slight_smile:

this would be a fairly intensive change to the command interpreter which currently makes no imposition on what is being typed. However, we did have a Google Summer of Code project in 2018 that successfully implemented a “Did you mean…?” suggestion feature. it was sadly never integrated into the main codebase, but I would imagine this could possibly pick up a ‘did you mean…’ suggestion when it sees mismatch parentheses to try to guess where one should be.

note that you can make a formal Wish List request over at, but I can’t promise how much attention it will get. But thank you for the suggestion!

Another bug report might not be necessary, please refer to
There, I added a link to the patch of Sudeepam. @nrjank and @dastew: was it only lack of maintainer time why this patch has not made it into Octave yet?

I believe that’s correct. since I’m sorta only set up to look at m-code I never worked with his compiled c-code. I think doug looked at that and depending on how good his memory is might have an opinion of whether it was ready to go.

I can’t correlate the latest answers to the question. The original post is about having closing a parenthesis added after you type an opening one.
Having this feature in the command window is probably not straightforward, as emphasized by Nick, but in the source editor it’s another story: we already have a similar feature which adds end(if/for/...) after you type if, for,....

1 Like