Add readline editing and history capability to commandline interfaces


/ Published in: Bash
Save to your folder(s)

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.


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.