helpThe GNU Bourne-Again SHell - Support: sr #108547, Is there a function to replace the...


sr #108547: Is there a function to replace the command line text?

Submitted by:  Dave Yost <yost>
Submitted on:  Fri 18 Apr 2014 07:53:34 PM UTC  
Category: NonePriority: 5 - Normal
Severity: 1 - WishStatus: Done
Privacy: PublicAssigned to: None
Open/Closed: OpenOperating System: None

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

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


Fri 13 Nov 2015 05:59:32 PM UTC, comment #3:

There is not. You can use bind -x to bind a particular key sequence to a shell function, and replace READLINE_LINE and READLINE_POINT within that function, but there is no builtin to do this.

Chet Ramey <chet>
Project Administrator
Wed 25 Mar 2015 11:56:25 AM UTC, comment #2:

Zsh has everything I needed, beyond my wildest dreams!

Dave Yost <yost>
Wed 25 Mar 2015 10:54:34 AM UTC, comment #1:

This should be priority: 1 - Wish

May also want to ask on help-bash

Eduardo Bustamante <dualbus>
Fri 18 Apr 2014 07:53:34 PM UTC, original submission:

Is there a builtin function that replaces the command line with the function's output? The completion mechanism must use such a function, so there has to be something like that.

I want to use that function to build a function I can use to run a demo consisting of a sequence of commands.

  • Make an array of strings
  • For each step of the demo

* Type a command or a keyboard shortcut that grabs the next string
from the array and places it on the command line
* Hit Enter to execute the command

Is this an RFE or an RTFM? I couldn't find the answer to this in the docs or on the web.


Dave Yost <yost>


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

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by chet (Posted a comment)
  • -unavailable- added by dualbus (Posted a comment)
  • -unavailable- added by yost (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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 13 Nov 2015 05:59:32 PM UTCchetSeverity3 - Normal=>1 - Wish

    Back to the top

    Powered by Savane 3.1-cleanup