mainThe 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?

Submitter:  Dave Yost <yost>
Submitted:  Fri 18 Apr 2014 07:53:34 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  1 - Wish Status:  Done
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group administrator
Wed 25 Mar 2015 11:56:25 AM UTC, comment #2: 

Zsh has everything I needed, beyond my wildest dreams!
http://yost.com/computers/demo-shell-commands/demo-shell-commands.zsh

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.

Thanks

Dave Yost <yost>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by chet (Posted a comment)
  • -email is unavailable- added by dualbus (Posted a comment)
  • -email is unavailable- added by yost (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-11-13 chet Severity3 - Normal 1 - Wish
        StatusNone Done

    Back to the top

    Powered by Savane 3.12.
    Corresponding source code