Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion #55: savannah: tab completion vs. spaces and escaping
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ticket System  
View profile  
 More options May 17 2012, 6:33 am
From: "Ticket System" <tick...@midnight-commander.org>
Date: Thu, 17 May 2012 10:33:45 -0000
Local: Thurs, May 17 2012 6:33 am
Subject: Re: [Midnight Commander] #55: savannah: tab completion vs. spaces and escaping
#55: savannah: tab completion vs. spaces and escaping
---------------------------+----------------------------------
    Reporter:  slavazanko  |                Owner:  slavazanko
        Type:  defect      |               Status:  accepted
    Priority:  major       |            Milestone:  4.8.4
   Component:  mc-core     |              Version:  master
  Resolution:              |             Keywords:
  Blocked By:              |             Blocking:  2450, 2626
Branch state:  on review   |  Votes for changeset:
---------------------------+----------------------------------

Comment (by ossi):

 a recommendation for the commit message: use the past tense for the broken
 things that your commit fixes. it makes no sense to describe *some* state
 in the present tense, because it is not clear whether that's the new or
 the old state.

 your re-definition of INPUT_COMPLETE_DEFAULT makes it a misnomer - it's
 more like INPUT_COMPLETE_NONE now.

 anyway, the more i look into this code, the less i understand. what
 exactly is the above fragment supposed to do? the "stop chars" in the
 strchr are applied irrespective of mode, which makes no sense to me at
 all. what is INPUT_COMPLETE_SPACE_ESC meant to actually do? as far as i
 can see, there are only two modes: plain (regular line inputs) and shell-
 like (command prompt. fwiw, the built-in cd should just pretend to be a
 regular cd command (i.e., follow the normal shell splitting and quoting
 rules), then there would be no ambiguity). i can't find the code which is
 supposed to quote completions for the command prompt - am i or the code
 missing something?

 try_complete() contains a lot of fuzzy logic, in particular with backslash
 escaping being handled rather arbitrarily or not at all.
 strutils_is_char_escaped() should be consistently applied, with regard to
 the mode.

 INPUT_COMPLETE_DIRNAMES needs to be split out from INPUT_COMPLETE_CD,
 otherwise the "cd" detection magic is activated outside command prompt
 context as well.

 generally, i'd suggest that you *precisely* describe the intended
 semantics of the INPUT_COMPLETE_* enum values next to their declarations,
 and then match these descriptions against both the implementation and the
 usages.

 wow. two hours gone.

--
Ticket URL: <http://www.midnight-commander.org/ticket/55#comment:17>
Midnight Commander <http://www.midnight-commander.org>
Midnight Development Center


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.