Re: [PATCH] Add active mark, face support; activate mark on paste

2018-06-08 Thread Chet Ramey
On 6/7/18 10:45 PM, Daniel Colascione wrote:
> Hey. I'd appreciate a quick peek at this patch. The lack of visual feedback
> on paste is leading people to turn off bracketed paste mode, which is
> unfortunate.

I've looked at it briefly. I have not had time to put it into the devel
branch yet; probably after bash-5.0 is released.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/



Re: [PATCH] Add nofirstword completion option

2018-06-08 Thread Luca Boccassi
On Fri, 2018-06-01 at 14:40 +0100, Luca Boccassi wrote:
> On Tue, 2018-05-29 at 15:44 +0100, Luca Boccassi wrote:
> > On Fri, 2018-05-25 at 14:40 -0400, Chet Ramey wrote:
> > > On 5/25/18 1:42 PM, Luca Boccassi wrote:
> > > 
> > > > > There is already logic that determines whether the shell is
> > > > > trying to
> > > > > complete a command word (in_command_position). The existing
> > > > > code
> > > > > does
> > > > > not attempt programmable completion if in_command_position ==
> > > > > 1.
> > > > > The
> > > > > additional functionality would:
> > > > > 
> > > > > 1. Add an option to the complete builtin to specify how to
> > > > > complete
> > > > >    command names, and store it in a specially-named compspec,
> > > > > like
> > > > >    completion for empty lines does.
> > > > > 
> > > > > 2. Add code to invoke that completion, if it exists and
> > > > > programmable
> > > > >    completion is active, before attempting bash's default
> > > > > completion,
> > > > >    if in_command_position == 1.
> > > > > 
> > > > > Chet
> > > > 
> > > > Hi,
> > > > 
> > > > Thanks for the guidance! Unfortunately I'm still not quite
> > > > there
> > > > yet -
> > > > inlined are the changes based on my understanding of the above.
> > > > It
> > > > implements a "usercmd/-U" option similar to the existing -E for
> > > > empty
> > > > line.
> > > > 
> > > > But at the moment all it does is to allow (via "complete -U -F
> > > > foo") to
> > > > complete when nothing is typed in, which seemed to be possible
> > > > already
> > > > with -E. If some characters are already typed in, it will still
> > > > do
> > > > the
> > > > default completion to commands in the PATH.
> > > > 
> > > > What have I missed?
> > > 
> > > You should make sure you don't add your code in the section with
> > > the
> > > rest
> > > of the programmable completions, since that block is not entered
> > > if
> > > in_command_position != 0.
> > 
> > Thanks for the suggestion, it works perfectly now!
> > 
> > Inlined is the latest revision, with added documentation. Let me
> > know
> > if you'd like me to change anything.
> 
> Hello Chet,
> 
> Just noticed other devs sent patches as attachments rather than
> inline,
> so just in case that's a more convenient form to review I'm including
> the diff as an attachment.
> 
> Thanks!

Hi Chet,

Any chance you had a sec to look at the diff? Would love some feedback!

Thanks!

-- 
Kind regards,
Luca Boccassi

signature.asc
Description: This is a digitally signed message part


Re: [PATCH] Add nofirstword completion option

2018-06-08 Thread Chet Ramey
On 6/8/18 10:40 AM, Luca Boccassi wrote:

> Any chance you had a sec to look at the diff? Would love some feedback!

I'm going to try and look at it this weekend. It's been a busy couple of
months.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/



signature.asc
Description: OpenPGP digital signature