Posted By

deepsoul on 07/26/09


Tagged

Shell commandline history readline


Versions (?)

Add readline editing and history capability to commandline interfaces


 / Published in: Bash
 

You can use socat (http://www.dest-unreach.org/socat/) to add readline editing and history capability to command shells which do not themselves support it. Each command line will be edited in the plain, so beware of password prompts. Commands are printed again as they are passed on.

  1. function rline ()
  2. {
  3. socat READLINE EXEC:"$*",pty
  4. }
  5.  
  6. # Usage example:
  7. rline ncftp -u anonymous ftp.kernel.org

Report this snippet  

You need to login to post a comment.