I want to open man pages in another text editor, in this case "nano". Does anyone know how I can achieve this please?


As of nano 2.2 you can just pipe the input in:

man foo | nano

Source http://www.nano-editor.org/dist/v2.2/TODO :

For version 2.2:
    Allow nano to work like a pager (read from stdin) [DONE]
| improve this answer | |

To change it permanently, you want to use the MANPAGER environmental variable. For instance, you can put this in your ~/.bashrc:

export MANPAGER="nano -"

which will open manpages with nano. Unfortunately, it is full of color escapes, which isn't especially attractive. It's not trivial to get man to drop the colors, and you will probably have to make a function. Maybe pipe it through cat.

Alternatively, you may look into using vim as a manpage reader which preserves the colors well but gives you the power of an editor.

| improve this answer | |

Use some buffer.

man %something% > /tmp/out.txt
nano /tmp/out.txt
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.