Откройте страницу руководства с помощью nano

763
Reado

Я хочу открыть справочные страницы в другом текстовом редакторе, в данном случае «nano». Кто-нибудь знает, как я могу добиться этого, пожалуйста?

1

3 ответа на вопрос

2
RJFalconer

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] 
1
ssmy

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
someuser

Use some buffer.

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

Похожие вопросы