3

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

3 Answers 3

2

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]
2

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.

0

Use some buffer.

man %something% > /tmp/out.txt
nano /tmp/out.txt

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .