Fixing Nano Issues on Linux

Licens­ing issues between Pine and Red­Hat have led to the dis­ap­per­ance of the friendly text edi­tor called "Pico", putting "GNU Nano" in its place. The lat­ter has its set of prob­lems, lines dis­ap­pear etc. Here's a make-shift workaround.

Licens­ing issues between Pine and Red­Hat have led to the dis­ap­per­ance of PINE from Linux dis­tri­b­u­tions on most web hosts, which in turns means the van­ish­ing of the friendly text edi­tor called "Pico". The option my web­host pro­vides me now is some­thing called "nano" (click here for a review from Linuxgazette).

Nano, how­ever, has a bunch of bugs — the most crim­i­nal of them being one where new­lines appear at will in the file you are edit­ing, the delete and back­space and meta keys cease to work, the cur­sor mark doesn't pro­ceed to the new line etc. It's a bizarre expe­ri­ence. And my web­host was at his wit's end.

I do miss Pico, and no, I wouldn't learn VI or EMACS if I had to do it to save my life. So with all my dig­ging and search­ing, I've man­aged to stum­ble upon a work-around to Nano instead.

Just exe­cute the fol­low­ing in your shell envi­ron­ment (e.g., through .bashrc for bash, or .cshrc for tsch)

export TERM=vt100

alias pico='nano –p –w –i –c'

If it is not in the auto sourced files, then just "source" this file on the shell, and your "pico " should work again, as usual. Click here for the com­mand line options of nano.

1 comment
  1. coolio says: Apr 10, 20049:12 pm

    this is cool thanks saved a lot of unpredik­table behav­ior from my edi­tor on the lat­est rh. cheers

Submit comment