Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support variable arguments, for subcommands like "tldr git checkout" #79

Closed
benatkin opened this issue Mar 22, 2019 · 1 comment
Closed

Comments

@benatkin
Copy link

tldr tldr shows tldr git checkout as an option:

➜  components git:(develop) ✗ tldr tldr

  Simplified man pages.

  Get typical usages of a command (hint: this is how you got here!):

      tldr command

  Show the tar tldr page for linux:

      tldr -p linux tar

  Get help for a git subcommand:

      tldr git checkout

➜  components git:(develop) ✗

tldr git checkout doesn't work:

➜  components git:(develop) ✗ tldr tealdeer
Page tealdeer not found in cache
Try updating with `tldr --update`, or submit a pull request to:
https://github.com/tldr-pages/tldr
➜  components git:(develop) ✗

Poking around, tldr git-checkout works:

➜  components git:(develop) ✗ tldr git-checkout

  Checkout a branch or paths to the working tree.
  Homepage: <https://git-scm.com/docs/git-checkout>.

  Create and switch to a new branch:

      git checkout -b branch_name

  Create and switch to a new branch based on a specific reference (branch, remote/branch, tag are examples of valid references):

      git checkout -b branch_name reference

  Switch to an existing local branch:

      git checkout branch_name

  Switch to an existing remote branch:

      git checkout --track remote_name/branch_name

  Discard all unstaged changes in the current directory (see `git reset` for more undo-like commands):

      git checkout .

  Discard unstaged changes to a given file:

      git checkout file_name

  Replace a file in the current directory with the version of it committed in a given branch:

      git checkout branch_name -- file_name

➜  components git:(develop) ✗

I think that perhaps if there are variable arguments they get joined together with a dash. It would be nice if everything tldr tldr worked with tealdeer :)

@dbrgn
Copy link
Collaborator

dbrgn commented Jan 1, 2022

This was implemented a while ago in #75 (tealdeer 1.2.0).

@dbrgn dbrgn closed this as completed Jan 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants