[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cat and pipelines, mostly (was Re: Delete all after a pattern)



On Sat, Aug 31, 2019 at 11:56:48AM -0400, Roberto C. Sánchez wrote:
> On Sat, Aug 31, 2019 at 11:38:59AM -0400, The Wanderer wrote:

[...]

> > I don't suppose you know of any shells which have that behavior, even as
> > an option?
> > 
> I am not aware of such a shell, though I have a vague recollection of an
> IDE that included an interactive shell component that did something
> similar.  However, that was ages ago and I don't even recall what
> language the IDE was for.

Somehow I've got the impression that this isn't the shell's job, but
readline's. I'd look there for inspiration.

Who knows, perhaps there /is/ a way for that. Heck, there's even a
shell variable containing the cursor position. From the bash manual

   READLINE_POINT
      The position of the insertion point in the readline line
      buffer, for use with "bind -x" (see SHELL BUILTIN COMMANDS
      below).

Of course, you'd have to add some fantasy to succeed. Exercise,
reader and that ;-D

Cheers
-- t

Attachment: signature.asc
Description: Digital signature


Reply to: