(   )
                          (    )
                           (    )
                          (    )
                            )  )
                           (  (                  /\
                            (_)                 /  \  /\
                    ________[_]________      /\/    \/  \
           /\      /\        ______    \    /   /\/\  /\/\
          /  \    //_\       \    /\    \  /\/\/    \/    \
   /\    / /\/\  //___\       \__/  \    \/
  /  \  /\/    \//_____\       \ |[]|     \
 /\/\/\/       //_______\       \|__|      \
/      \      /XXXXXXXXXX\                  \
        \    /_I_II  I__I_\__________________\
               I_I|  I__I_____[]_|_[]_____I
               I_II  I__I_____[]_|_[]_____I
               I II__I  I     XXXXXXX     I
            ~~~~~"   "~~~~~~~~~~~~~~~~~~~~~~~~

Mon, 02 Sep 2019

Using Rlwrap With Ed

There are a few good tutorials on the 'ed' editor floating around gopherspace, the one I've most recently seen is from KatolaZ [0][1]. It's nice and simple, but I find the actual line editing a bit sparse - neither the GNU nor BSD versions of ed are linked with GNU readline, so you don't have access to the usual arrow, ctrl-a, ctrl-e, alt-d, etc. keys. But it's really easy to add this functionality, using 'rlwrap', like so:

rlwrap ed

Obviously you might need to install rlwrap, but it is packaged for many linux distros as well as BSDs. I have a shell alias setup for it:

alias ed='/usr/local/bin/rlwrap /bin/ed'

posted at: 11:33 | path: / | permalink | ed, rlwrap, tips