patchGNU Octave - Patches: patch #7584, Make filename completion more...


patch #7584: Make filename completion more sensible by removing three characters from the word break list

Submitted by:  None
Submitted on:  Tue 26 Jul 2011 08:30:45 PM UTC  
Category:  None Priority:  5 - Normal
Status:  Duplicate Privacy:  Public
Assigned to:  None Originator Email:  -email is unavailable-
Open/Closed:  Closed

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


( Jump to the original submission)

Tue 07 Jun 2016 02:51:41 AM UTC, comment #7:

Thanks for the patch, Philipp. I wish I had seen it when I started work on bug #44095. It looks really nice! However, I think that the patch for that bug supersedes this one, so I'll close this patch.

The main advantages of the patch for bug #44095 are:
- It considers filenames for all commands, since there are so many that require it (save, imread, mkdir etc. -- Rik came up with a list of dozens of commands).
- It allows filenames containing most characters, notably "\" needed for Windows.
- It has been applied...

Lachlan Andrew <lachlan>
Tue 13 Aug 2013 01:47:07 PM UTC, comment #6:

Attached is a patch implementing working file name completion (well, tested only with sane file names). The basic issue is that Readline gives us the line broken with the chars in the command-word-break set, but they are too much for file name completion (e.g. they contain "~", "-"...). Thus, we have to get our hands on the original line AND the bounds of what Readline considers the broken word in it. Then we hook into that break according to a reduced char set.

The actual patch is make-file-name-completion-work-1.patch. The other file, completion-working-1-DEBUG.diff, is just a bare diff where the code in has some debugging lines added (writing diagnostics to "/home/pk/octave/compl").

(file #28831, file #28832)

Philipp Kutin <pkutin>
Thu 22 Nov 2012 07:39:09 AM UTC, comment #5:

I think this patch should be closed.
There have been no complains about completion and as stated in the comments is a tricky business.
Lets hope that the anonymous author did not forget about this improvement.

Reason: Wont do

Juan Pablo Carbajal <juanpi>
Project Member
Sun 31 Jul 2011 09:23:43 AM UTC, comment #4:

I don't think it's a very good patch myself. Hopefully I'll be able to come up with something that doesn't introduce regressions some time...

Fri 29 Jul 2011 04:37:02 PM UTC, comment #3:

So... I'm confused... are you saying this patch shouldn't be applied at all? I like the idea of making tab completion smarter over filenames, but it does look tricky.

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Tue 26 Jul 2011 09:26:52 PM UTC, comment #2:

Disregard that last comment... this probably needs a lot more thought than just some quick hacks. :/

Tue 26 Jul 2011 09:17:23 PM UTC, comment #1:

Oops, of course things like 'a = qwe-<TAB>' won't complete now... but I think this is fixable by stripping off the first char in in that case.

Tue 26 Jul 2011 08:30:45 PM UTC, original submission:

This fixes completion of file names that are not in the current directory because e.g. they start with ~ or /. See the (slightly haughty, sorry) comment in the attached patch for why. I don't think that the completion of Octave code (variable names etc.) really suffers from this because there is rarely need to complete the empty string. Also includes 'load' in the list of commands to do filename completion for.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #23700:  fix_filename_completion_1.diff added by None (1KiB - text/x-patch - the patch...)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by lachlan (Posted a comment)
  • -email is unavailable- added by pkutin (Updated the item)
  • -email is unavailable- added by juanpi (Posted a comment)
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-06-07 lachlan StatusNone => Duplicate
        Open/ClosedOpen => Closed
    2013-08-13 pkutin Attached File- => Added make-file-name-completion-work-1.patch, #28831
        Attached File- => Added completion-working-1-DEBUG.diff, #28832
    2011-07-26 None Attached File- => Added fix_filename_completion_1.diff, #23700

    Back to the top

    Powered by Savane 3.3