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: NonePriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOriginator Email: -unavailable-
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

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 input.cc 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>
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...

Anonymous
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. :/

Anonymous
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 input.cc:generate_completion() in that case.

Anonymous
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.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 13 Aug 2013 01:47:07 PM UTCpkutinAttached File-=>Added make-file-name-completion-work-1.patch, #28831
      Attached File-=>Added completion-working-1-DEBUG.diff, #28832
    Tue 26 Jul 2011 08:30:45 PM UTCNoneAttached File-=>Added fix_filename_completion_1.diff, #23700

    Back to the top


    Powered by Savane 3.1-cleanup