Code Monkey home page Code Monkey logo

Comments (4)

dbrgn avatar dbrgn commented on August 24, 2024 1

If the command isn't supported by git out of the box, you need to set it up in your config using man.tdr.cmd:

https://git-scm.com/docs/git-help#_man_viewer

However, tealdeer is not a generic man viewer, so I'm not sure if this is the best idea 🙂 However, if it works for you, that's great.

I'll close this issue for now since it's not a feature request, but feel free to add further comments.

from tealdeer.

niklasmohrin avatar niklasmohrin commented on August 24, 2024

Git does not use your shell to spawn the man process, so it is unaware of your aliases. You need to tell git by following the explanation from the link you provided. If setting the configuration does not work, you could try setting the environment variable GIT_MAN_VIEWER=tldr before running git, probably in your shell config. Does this help?

from tealdeer.

yozachar avatar yozachar commented on August 24, 2024

No, that does not seem to work either:

$ export GIT_MAN_VIEWER=tldr
$ echo $GIT_MAN_VIEWER
tldr
$ git log --help                                                   
warning: 'tldr': unknown man viewer.
warning: failed to exec 'man': No such file or directory
fatal: no man viewer handled the request

from tealdeer.

yozachar avatar yozachar commented on August 24, 2024

That works,

$ git config --global man.viewer tldr
$ git config --global man.tldr.cmd tldr
$ git log --help
  Show a history of commits.
  More information: <https://git-scm.com/docs/git-log>.

  Show the sequence of commits starting from the current one, in reverse chronological order of the Git repository in the current working directory:

      git log

  Show the history of a particular file or directory, including differences:

      git log -p path/to/file_or_directory

  Show an overview of which file(s) changed in each commit:

      git log --stat

  Show a graph of commits in the current branch using only the first line of each commit message:

      git log --oneline --graph

  Show a graph of all commits, tags and branches in the entire repo:

      git log --oneline --decorate --all --graph

  Show only commits whose messages include a given string (case-insensitively):

      git log -i --grep search_string

  Show the last N commits from a certain author:

      git log -n number --author=author

  Show commits between two dates (yyyy-mm-dd):

      git log --before="2017-01-29" --after="2017-01-17"

Thanks!

from tealdeer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.