Skip to main content
remove extra word
Source Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 264

I like the idea of checking the man pageman return code; you can't pipe to the test, though. You could just run man twice:

viman () { man "$@" >/dev/null 2>&1 && man "$@" | vim -R +":set ft=man" - ; }

This runs man ... | vim ... only if the first invocation of man was successful.

I like the idea of checking the man page return code; you can't pipe to the test, though. You could just run man twice:

viman () { man "$@" >/dev/null 2>&1 && man "$@" | vim -R +":set ft=man" - ; }

This runs man ... | vim ... only if the first invocation of man was successful.

I like the idea of checking the man return code; you can't pipe to the test, though. You could just run man twice:

viman () { man "$@" >/dev/null 2>&1 && man "$@" | vim -R +":set ft=man" - ; }

This runs man ... | vim ... only if the first invocation of man was successful.

Source Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 264

I like the idea of checking the man page return code; you can't pipe to the test, though. You could just run man twice:

viman () { man "$@" >/dev/null 2>&1 && man "$@" | vim -R +":set ft=man" - ; }

This runs man ... | vim ... only if the first invocation of man was successful.