Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dflock/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.
https://github.com/dflock/manpage-wrapper

manpage tldr

Last synced: 21 days ago
JSON representation

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.

Awesome Lists containing this project

README

        

# Manpage Wrapper
:author: Duncan Lock

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

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

## Usage

```shell
# 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: .
[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
```