Skip to content

dflock/Manpage-Wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Manpage Wrapper

Wraps both tldr & man. If there’s a tldr page, it’ll use your tldr client to display it, if not it’ll offer to try man instead.

Requirements

This requires some kind of tldr client, eg tealdear: See: https://github.com/dbrgn/tealdeer.

Installation

$ sudo cp manpage-wrapper.sh /usr/bin/manpage-wrapper
$ alias man="manpage-wrapper"

Usage

# Lookup something without a tldr page:
$ ./manpage-wrapper.sh look
Page look not found in cache
Try updating with `tldr --update`, or submit a pull request to:
https://github.com/tldr-pages/tldr
Show manpage (y/n)?y

LOOK(1)                                                    BSD General Commands Manual                                                    LOOK(1)

NAME
     look — display lines beginning with a given string

SYNOPSIS
     look [-bdf] [-t termchar] string [file ...]
...

# Lookup something with a tldr page:
$ ./manpage-wrapper.sh tar
  Archiving utility.
  Often combined with a compression method, such as gzip or bzip.
  More information: <https://www.gnu.org/software/tar>.
  [c]reate an archive from [f]iles:
      tar cf target.tar file1 file2 file3
  [c]reate a g[z]ipped archive from [f]iles:
      tar czf target.tar.gz file1 file2 file3

About

Wraps both tldr & man. If there’s a tldr page, it’ll use your tldr client to display it, if not it’ll offer to try man instead.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages