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

Allow specifying platform in tldr command line #62

Closed
pborenstein opened this issue Jan 31, 2014 · 4 comments
Closed

Allow specifying platform in tldr command line #62

pborenstein opened this issue Jan 31, 2014 · 4 comments
Labels
bug Issues with our clients or rendering of pages, etc. clients Issues pertaining to a particular client or the clients as whole.

Comments

@pborenstein
Copy link
Contributor

tldr --platform gnu ln

Each platform uses its own version of a tool (BSD vs GNU, for instance), but in some cases the native platform version may be superseded by another version. (Related to #61)

OS X uses BSD ln

os x$ ln -h
usage: ln [-Ffhinsv] source_file [target_file]
       ln [-Ffhinsv] source_file ... target_dir
       link source_file target_file

Linux tends to use GNU ln

gnu$ ln --help
Usage: ln [OPTION]... [-T] TARGET LINK_NAME   (1st form)
  or:  ln [OPTION]... TARGET                  (2nd form)
  or:  ln [OPTION]... TARGET... DIRECTORY     (3rd form)
  or:  ln [OPTION]... -t DIRECTORY TARGET...  (4th form)
In the 1st form, create a link to TARGET with the name LINK_NAME.
In the 2nd form, create a link to TARGET in the current directory.
In the 3rd and 4th forms, create links to each TARGET in DIRECTORY.
... and so on ...

SunOS uses SunOS ln

sunos$ /usr/bin/ln -h
/usr/bin/ln: illegal option -- h
ln: Insufficient arguments (0)
Usage: ln [-f] [-n] [-s] f1 [f2]
       ln [-f] [-n] [-s] f1 ... fn d1
       ln [-f] [-n] -s d1 d2

(Though in some SmartOS images, the ln tool is symlinked to GNU ln)

@rprieto
Copy link
Contributor

rprieto commented Jan 31, 2014

Hi,

Pull request #44 actually added support for this: tldr pacman --os=linux
We should update the docs to mention it.

I do like the idea of renaming the "groups" to the tool flavours gnu / bsd as opposed to linux / osx.

@pborenstein
Copy link
Contributor Author

You could still use os.platform() by changing the semantics of osDirectories. But I'm sure you've thought of that :)

var osDirectories = {
    darwin  : 'bsd',
    linux   : 'gnu',
    sunos   : 'sunos'
};

@rprieto rprieto mentioned this issue Feb 9, 2014
@rprieto
Copy link
Contributor

rprieto commented Mar 5, 2014

@pborenstein what are your thoughts on #61?

@rprieto
Copy link
Contributor

rprieto commented Oct 2, 2014

Closing, we should consolidate this discussion in #190

@rprieto rprieto closed this as completed Oct 2, 2014
@CleanMachine1 CleanMachine1 added bug Issues with our clients or rendering of pages, etc. clients Issues pertaining to a particular client or the clients as whole. labels Jul 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues with our clients or rendering of pages, etc. clients Issues pertaining to a particular client or the clients as whole.
Projects
None yet
Development

No branches or pull requests

3 participants