GithubHelp home page GithubHelp logo

tldr-pages / tldr-node-client Goto Github PK

View Code? Open in Web Editor NEW
425.0 15.0 70.0 1.36 MB

Node.js command-line client for tldr pages

Home Page: https://www.npmjs.com/package/tldr

License: MIT License

JavaScript 97.04% Shell 2.96%
nodejs tldr tldr-pages javascript hacktoberfest linux macos windows

tldr-node-client's Introduction

tldr-node-client

NPM version GitHub Action Build Status Matrix chat

A Node.js based command-line client for tldr.

tldr screenshot

tldr-node-client's output for the tar page, using a custom color theme

Installing

npm install -g tldr

Usage

To see tldr pages:

  • tldr <command> show examples for this command
  • tldr <command> --platform=<osx, darwin, macos, freebsd, linux, netbsd, openbsd, sunos, android, windows, win32> show command page for the given platform
  • tldr --android <command> show command page for Android
  • tldr --darwin <command> show command page for darwin (macOS)
  • tldr --freebsd <command> show command page for FreeBSD
  • tldr --linux <command> show command page for Linux
  • tldr --macos <command> show command page for macOS
  • tldr --netbsd <command> show command page for NetBSD
  • tldr --openbsd <command> show command page for OpenBSD
  • tldr --osx <command> show command page for osx (macOS)
  • tldr --sunos <command> show command page for SunOS
  • tldr --win32 <command> show command page for win32 (Windows)
  • tldr --windows <command> show command page for Windows
  • tldr --search "<query>" search all pages for the query
  • tldr --list show all pages for current platform
  • tldr --list-all show all available pages
  • tldr --random show a page at random
  • tldr --random-example show a single random example
  • tldr --markdown show the original markdown format page

The client caches a copy of all pages locally, in ~/.tldr. There are more commands to control the local cache:

  • tldr --update download the latest pages and generate search index
  • tldr --clear-cache delete the entire local cache

As a contributor, you might also need the following commands:

  • tldr --render <path> render a local page for testing purposes

Tldr pages defaults to showing pages in the current language of the operating system, or English if that's not available. To view tldr pages for a different language, set an environment variable LANG containing a valid POSIX locale (such as zh, pt_BR, or fr) and then run the above commands as usual. In most *nix systems, this variable will already be set.

It is suggested that the LANG environment variable be set system-wide if this isn't already the case. Users without sudo access can set it locally in their ~/.profile.

  • LANG=zh tldr <command>

For the list of available translations, please refer to the main tldr repo.

Configuration

You can configure the tldr client by adding a .tldrrc file in your HOME directory. You can copy the contents of the config.json file from the repo to get the basic structure to start with, and modify it to suit your needs.

The default color theme is the one named "simple". You can change the theme by assigning a different value to the "theme" variable -- either to one of the pre-configured themes, or to a new theme that you have previously created in the "themes" section. Note that the colors and text effects you can choose are limited. Refer to the chalk documentation for all options.

{
  "themes": {
    "ocean": {
      "commandName": "bold, cyan",
      "mainDescription": "",
      "exampleDescription": "green",
      "exampleCode": "cyan",
      "exampleToken": "dim"
    },
    "myOwnCoolTheme": {
      "commandName": "bold, red",
      "mainDescription": "underline",
      "exampleDescription": "yellow",
      "exampleCode": "underline, green",
      "exampleToken": ""
    }
  },
  "theme": "ocean"
}

If you regularly need pages for a different platform (e.g. Linux), you can put it in the config file:

{
  "platform": "linux"
}

The default platform value can be overwritten with command-line option:

tldr du --platform=<osx>

As a contributor, you can also point to your own fork containing the tldr.zip file. The file is just a zipped version of the entire tldr repo:

{
  "repository": "http://myrepo/assets/tldr.zip"
}

By default, a cache update is performed anytime a page is not found for a command. To prevent this behavior, you can set the configuration variable skipUpdateWhenPageNotFound to true (defaults to false):

{
  "skipUpdateWhenPageNotFound": true
}

Command-line Autocompletion

Currently we only support command-line autocompletion for zsh and bash. Pull requests for other shells are most welcome!

zsh

It's easiest for oh-my-zsh users, so let's start with that.

mkdir -p $ZSH_CUSTOM/plugins/tldr
ln -s bin/completion/zsh/_tldr $ZSH_CUSTOM/plugins/tldr/_tldr

Then add tldr to your oh-my-zsh plugins, usually defined in ~/.zshrc, resulting in something looking like this:

plugins=(git tmux tldr)

Alternatively, using zplug

zplug "tldr-pages/tldr-node-client", use:bin/completion/zsh

Fret not regular zsh user! Copy or symlink bin/completion/zsh/_tldr to my/completions/_tldr (note the filename). Then add the containing directory to your fpath:

fpath=(my/completions $fpath)

Bash

ln -s bin/completion/bash/tldr ~/.tldr-completion.bash

Now add the following line to our bashrc file:

source ~/.tldr-completion.bash

FAQ

Installation Issues

  • If you are trying to install as non-root user (npm install -g tldr) and get something like:
Error: EACCES: permission denied, access '/usr/local/lib/node_modules/tldr'

Then most probably your npm's default installation directory has improper permissions. You can resolve it by clicking here

  • If you are trying to install as a root user (sudo npm install -g tldr) and get something like:
as root ->
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/tldr/node_modules/webworker-threads/.node-gyp"
gyp WARN EACCES user "root" does not have permission to access the dev dir "/usr/local/lib/node_modules/tldr/node_modules/webworker-threads/.node-gyp/8.9.1"

You need to add the option --unsafe-perm to your command. This is because when npm goes to the postinstall step, it downgrades the permission levels to "nobody". Probably you should fix your installation directory permissions and install as a non-root user in the first place.

  • If you see an error related to webworker-threads like:
/usr/local/lib/node_modules/tldr/node_modules/natural/lib/natural/classifiers/classifier.js:32
    if (e.code !== 'MODULE_NOT_FOUND') throw e;

Most probably you need to reinstall node-gyp and webworker-threads. Try this -

sudo -H npm uninstall -g tldr
sudo -H npm uninstall -g webworker-threads
npm install -g node-gyp
npm install -g webworker-threads
npm install -g tldr

For further context, take a look at this issue

Colors under Cygwin

Colors can't be shown under Mintty or PuTTY, because the dependency colors.js has a bug. Please show support to this pull request, so it can be merged.

Meanwhile, you can do one of the following to fix this issue:

  • Add the following script to your shell's rc file (.zshrc, .bashrc, etc.): (RECOMMENDED)
tldr_path="$(which tldr)"
function tldr() {
  eval "$tldr_path" $@ "--color"
}
  • Add alias tldr="tldr --color=true" to your shell's rc file.
  • Prepend process.stdout.isTTY = true; to tldr.js (NOT RECOMMENDED)
  • Fix colors.js's logic (NOT RECOMMENDED)
    • Go to %appdata%\npm\node_modules\tldr\node_modules\colors\lib\system\
    • Overwrite supports-colors.js with supports-colors.js from my repo.
  • Use CMD.exe.

Contributing

Contribution are most welcome! Have a look over here for a few rough guidelines.

tldr-node-client's People

Contributors

0xflotus avatar aero31aero avatar agnivade avatar billyjanitsch avatar brightdroid avatar come-maiz avatar danzimm avatar dependabot[bot] avatar gph-sn avatar igorshubovych avatar kbdharun avatar marchersimon avatar masterodin avatar mearns avatar mopolo avatar navarroaxel avatar nonzero avatar notpeter avatar oiyouyeahyou avatar owenvoke avatar ptolemybarnes avatar rodrigograca31 avatar rprieto avatar sbrl avatar tug avatar twang2218 avatar vivekjoshi556 avatar vladimyr avatar waldyrious avatar zlatanvasovic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tldr-node-client's Issues

Update fails (invalid signature)

Just copying the issue from tldr-pages/tldr#263.

Related error:

➜  ~  tldr --update
Updating...
Error: invalid signature: 0x2e736370
    at /usr/local/lib/node_modules/tldr/node_modules/unzip/lib/parse.js:59:13
    at processImmediate [as _immediateCallback] (timers.js:345:15)

A lot of people are getting them it seems, including a friend I introduced to the client. It may also be the cause of #11 because the cache got filled improperly.

Move from wrench to fs-extra

wrench is deprecated and unmaintained. The author has suggested moving over to fs-extra.

And also get rid of rimraf

Issues on Windows

Hi,
I'm trying to use the client on Windows (10) and I'm having some issues:

1) What should tldr --list show?
My output is Cache last updated [...date...] and then 3 empty lines

2) Why doesn't tldr shutdown work?
The output I get is

Page not found
Try updating with "tldr --update", or submit a pull request to [...]

I've already tried cleaning cache and updating, and in the cache folder (C:\Users\Matteo\.tldr\cache\pages\linux), the shutdown.md file exists.

Other commands like tldr tar work.

--render flag not outputting seemingly correctly formatted md page

From this session, there's something going on with the rendering. The page itself might not be properly format (but it's perfectly usable on Github's editor: https://github.com/ostera/tldr/blob/8a624be47ae8af7b4056e55127b24c2944a02a28/pages/not-found.md)

$ tldr --version
1.4.0

$ cat ./pages/not-found.md

# Oops! :(

## Command Not Found

It seems the command you were looking for is not available yet.

Contributing is simple! All done from within Github. [Add this page](https://github.com/tldr-pages/tldr/new/master/pages)

Questions? [Read our Contributing guidelines](https://github.com/tldr-pages/tldr/blob/master/CONTRIBUTING.md)

$ tldr --render ./pages/not-found.md

  Oops! :(


$

For cross reference, the not-found page is under discussion here: tldr-pages/tldr#652

Latest version is still broken

$ npm install -g tldr
/usr/local/bin/tldr -> /usr/local/lib/node_modules/tldr/bin/tldr
[email protected] /usr/local/lib/node_modules/tldr
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

$ tldr --update
Updating...
events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: stream.push() after EOF
    at readableAddChunk (/usr/local/lib/node_modules/tldr/node_modules/unzip/node_modules/readable-stream/lib/_stream_readable.js:168:15)
    at SliceStream.Readable.push (/usr/local/lib/node_modules/tldr/node_modules/unzip/node_modules/readable-stream/lib/_stream_readable.js:149:10)
    at SliceStream.Transform.push (/usr/local/lib/node_modules/tldr/node_modules/unzip/node_modules/readable-stream/lib/_stream_transform.js:145:32)
    at SliceStream.sliceFn (/usr/local/lib/node_modules/tldr/node_modules/unzip/node_modules/pullstream/pullstream.js:81:14)
    at SliceStream._transform (/usr/local/lib/node_modules/tldr/node_modules/unzip/node_modules/pullstream/node_modules/slice-stream/slicestream.js:28:10)
    at SliceStream.Transform._read (/usr/local/lib/node_modules/tldr/node_modules/unzip/node_modules/readable-stream/lib/_stream_transform.js:184:10)
    at SliceStream.Transform._write (/usr/local/lib/node_modules/tldr/node_modules/unzip/node_modules/readable-stream/lib/_stream_transform.js:172:12)
    at doWrite (/usr/local/lib/node_modules/tldr/node_modules/unzip/node_modules/readable-stream/lib/_stream_writable.js:237:10)
    at clearBuffer (/usr/local/lib/node_modules/tldr/node_modules/unzip/node_modules/readable-stream/lib/_stream_writable.js:316:5)
    at onwrite (/usr/local/lib/node_modules/tldr/node_modules/unzip/node_modules/readable-stream/lib/_stream_writable.js:274:7)

$ tldr --update
Updating...
Error: invalid signature: 0xa0000
    at /usr/local/lib/node_modules/tldr/node_modules/unzip/lib/parse.js:59:13
    at processImmediate [as _immediateCallback] (timers.js:358:17)

Markdown parser gobbles up inline formatting

Whenever description text is emphasized or bolded for effect, it disappears in the Node client output.

The following...

- Limit results to strings at least *length* characters long

`strings -n {{length}} {{file}}`

...is rendered as:

captura de pantalla 2015-12-31 a las 12 46 30 a m

(Compare against the web client.)

Note: the intention in this page is that length is a placeholder mentioned in the following example. Perhaps it use should the curly-brace mark-up instead; however, the curly-brace placeholders are only highlighted in the example code block:

- Limit results to strings at least `{{length}}` characters long

`strings -n {{length}} {{file}}`

captura de pantalla 2015-12-31 a las 12 41 15 a m

Slow performance

I've recently installed this, but I am feeling it is bit slow

I did time tldr ls

It says:

real    0m0.477s
user    0m0.405s
sys     0m0.082s

It will be better if it can work faster. 500ms is bit too high.

Cannot install

I am not able to install this package. It tells

permission denied, mkdir '/root/.tldr/cache'

although ran as root user.

Output

[root@dundee-dell ~]# npm install -g tldr
npm WARN deprecated [email protected]: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
/usr/bin/tldr -> /usr/lib/node_modules/tldr/bin/tldr

[email protected] postinstall /usr/lib/node_modules/tldr
node ./bin/tldr --update

Updating...
/usr/lib/node_modules/tldr/node_modules/wrench/lib/wrench.js:481
throw err;
^

Error: EACCES: permission denied, mkdir '/root/.tldr/cache'
at Error (native)
at Object.fs.mkdirSync (fs.js:842:18)
at Object.mkdirSyncRecursive (/usr/lib/node_modules/tldr/node_modules/wrench/lib/wrench.js:466:12)
at /usr/lib/node_modules/tldr/lib/cache.js:55:12
at Extract. (/usr/lib/node_modules/tldr/lib/remote.js:28:5)
at emitNone (events.js:85:20)
at Extract.emit (events.js:179:7)
at DirWriter. (/usr/lib/node_modules/tldr/node_modules/unzip2/lib/extract.js:42:10)
at emitNone (events.js:85:20)
at DirWriter.emit (events.js:179:7)
npm ERR! Linux 4.4.1-2-ARCH
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "tldr"
npm ERR! node v5.7.0
npm ERR! npm v3.7.5
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: node ./bin/tldr --update
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node ./bin/tldr --update'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the tldr package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./bin/tldr --update
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs tldr
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls tldr
npm ERR! There is likely additional logging output above.

npm-debug.log

9935 info lifecycle [email protected]postinstall: [email protected]
9936 verbose lifecycle [email protected]
postinstall: unsafe-perm in lifecycle false
9937 verbose lifecycle [email protected]postinstall: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/usr/lib/node_modules/tldr/node_modules/.bin:/usr/lib/node_modules/.bin:/usr/bin:/usr/lib/hardening-wrapper/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
9938 verbose lifecycle [email protected]
postinstall: CWD: /usr/lib/node_modules/tldr
9939 silly lifecycle [email protected]postinstall: Args: [ '-c', 'node ./bin/tldr --update' ]
9940 silly lifecycle [email protected]
postinstall: Returned: code: 1 signal: null
9941 info lifecycle [email protected]~postinstall: Failed to exec postinstall script
9942 verbose unlock done using /root/.npm/_locks/staging-a072192f34a17023.lock for /usr/lib/node_modules/.staging
9943 silly rollbackFailedOptional Starting
9944 silly rollbackFailedOptional Finishing
9945 silly runTopLevelLifecycles Starting
9946 silly runTopLevelLifecycles Finishing
9947 silly install printInstalled
9948 verbose stack Error: [email protected] postinstall: node ./bin/tldr --update
9948 verbose stack Exit status 1
9948 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:239:16)
9948 verbose stack at emitTwo (events.js:100:13)
9948 verbose stack at EventEmitter.emit (events.js:185:7)
9948 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/lib/utils/spawn.js:24:14)
9948 verbose stack at emitTwo (events.js:100:13)
9948 verbose stack at ChildProcess.emit (events.js:185:7)
9948 verbose stack at maybeClose (internal/child_process.js:827:16)
9948 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
9949 verbose pkgid [email protected]
9950 verbose cwd /root
9951 error Linux 4.4.1-2-ARCH
9952 error argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "tldr"
9953 error node v5.7.0
9954 error npm v3.7.5
9955 error code ELIFECYCLE
9956 error [email protected] postinstall: node ./bin/tldr --update
9956 error Exit status 1

Environment

  • Archlinux (updated), kernel 4.4.1-2-ARCH
  • NodeJS 5.7.0, npm 3.7.5

Clean up update output

For example:

$ tldr --update

Current pages: 0.0.1
Latest pages: 0.0.1
Already up to date

and

$ tldr --update

Current pages: 0.0.1
Latest pages: 0.0.2
Downloading.....   70kb
Unpacked 64 pages

don't rely only on color to identify the keywords

For commands like head which can have two options one next to the other, it is not clear when one option ends and the other starts. Also, we can't visually distinguish a 3-word option description from three one-word options except from context. How about preserving the {{}} or replacing them with another marker like <>?

Character "<" (less) is rendered as "≪"

Consider the following page

# bc

> Calculator.

- Calculate the result of expression

`bc <<< "(1 + 2) * 2 ^ 2"`

It is rendered

  bc
  Calculator.

  - Calculate the result of expression
    bc ≪≪≪ "(1 + 2) * 2 ^ 2"

It is wrong and cannot be safely copy-pasted to run in CLI.

"tldr" on it's own should show more detailed usage

Currently, when I execute tldr on its own, I get:

28 Dec 11:03:49 - Usage: tldr <command>

Instead, I think showing the output of tldr --help would provide more useful information to the user. I don't think the date and time are very important; is there some other significance behind showing the date and time?

Update codebase to ES6 standard

Node is EOLing 0.10 on Oct end. This is a good opportunity to make the minimum version to be 4. And make the codebase to be readable and maintainable.

Possible to do the initial --update on first run instead of on postinstall?

Instead of running the initial --update on postinstall, I wonder if it's possible to do so on first run instead? It would cause the least amount of surprise that way.

Right now, installing this package with sudo requires running a different command than npm install -g tldr. This is not mentioned in tldr's main site, and breaks certain flows (e.g. mass-install npm packages via devops tools).

Installation can be quite an ordeal (sudo | sudo --ignore-scripts and update | sudo --user=$(whoami))

There are at least 4 ways to install tldr (as normal user, via sudo, with --ignore-scripts and manual update, via sudo --user=$(whoami)). Not sure which should be used because none seems to be working out of the box in my case.

It looks to me as if installation script:

  1. expects that the directory ~/.tldr exists already
  2. does not cleanup /tmp/tldr and ~/.tldr in case of failure and upon uninstalling tldr

These things combined can turn a simple installation into quite a tedious task...

Expected behavior

Install and use tldr node client :)

Actual behavior

  1. Installed npm via package manager.
  2. Tried to install tldr as a user (because it is written here https://tldr-pages.github.io/#installation) -> npm install tldr -g failed
  3. Tried again via sudo because it is what https://github.com/tldr-pages/tldr-node-client#installing says sudo npm install tldr -g -> failed
  4. Found a workaround mentioned somewhere on github, tried again npm install -g --ignore-scripts tldr -> failed
  5. try again via sudo sudo npm install -g --ignore-scripts tldr -> installation is OK 👍
  6. tldr --update -> failed
  7. sudo tldr --update -> failed (not a real problem)
  8. sudo /usr/local/bin/tldr --update looks OK
  9. tldr ls -> please update
    Failed to update and started writing this description ...
  10. mkdir -p ~/.tldr to resolve one obvious problem
  11. tldr --update -> failed
  12. ls -l /tmp/tldr so there was something left -> sudo rm -r /tmp/tldr
  13. tldr --update 👍
  14. tldr ls 👍 👍
    Finally it works :)

Discovered that another suggested installation command is described at https://github.com/tldr-pages/tldr#tldr -- well it looks quite nice so I tried again:

  1. remove package as root # npm rm -g tldr
  2. cleanup # rm -r /root/.tldr
  3. # rm -r /tmp/tldr
  4. as a user ~> rm -r ~/.tldr
  5. sudo npm install -g tldr --user=$(whoami) -> failed again

Log, debug output

~> npm install tldr -g
npm ERR! Linux 4.4.36-8-default
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "tldr" "-g"
npm ERR! node v4.6.1
npm ERR! npm  v2.15.9
npm ERR! path /usr/local/lib
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir

npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib'
npm ERR!     at Error (native)
npm ERR!  { [Error: EACCES: permission denied, mkdir '/usr/local/lib']
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/usr/local/lib' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/rypl/npm-debug.log

~> sudo npm install tldr -g
root's password:
npm WARN deprecated [email protected]: use uuid module instead
/usr/local/bin/tldr -> /usr/local/lib/node_modules/tldr/bin/tldr

> [email protected] postinstall /usr/local/lib/node_modules/tldr
> node ./bin/tldr --update

Updating...
/usr/local/lib/node_modules/tldr/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js:47
          throw err0
          ^

Error: EACCES: permission denied, mkdir '/root/.tldr/cache'
    at Error (native)
    at Object.fs.mkdirSync (fs.js:794:18)
    at Object.mkdirsSync (/usr/local/lib/node_modules/tldr/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js:29:9)
    at /usr/local/lib/node_modules/tldr/lib/cache.js:36:8
    at Extract.<anonymous> (/usr/local/lib/node_modules/tldr/lib/remote.js:27:5)
    at emitNone (events.js:72:20)
    at Extract.emit (events.js:166:7)
    at DirWriter.<anonymous> (/usr/local/lib/node_modules/tldr/node_modules/unzip2/lib/extract.js:42:10)
    at emitNone (events.js:72:20)
    at DirWriter.emit (events.js:166:7)
npm ERR! Linux 4.4.36-8-default
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "tldr" "-g"
npm ERR! node v4.6.1
npm ERR! npm  v2.15.9
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `node ./bin/tldr --update`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script 'node ./bin/tldr --update'.
npm ERR! This is most likely a problem with the tldr package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./bin/tldr --update
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs tldr
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! 
npm ERR!     npm owner ls tldr
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/rypl/npm-debug.log

 ~> npm install -g --ignore-scripts tldr
npm ERR! Linux 4.4.36-8-default
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "--ignore-scripts" "tldr"
npm ERR! node v4.6.1
npm ERR! npm  v2.15.9
npm ERR! path /usr/local/lib
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir

npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib'
npm ERR!     at Error (native)
npm ERR!  { [Error: EACCES: permission denied, mkdir '/usr/local/lib']
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/usr/local/lib' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/rypl/npm-debug.log

~> sudo npm install -g --ignore-scripts tldr
npm WARN deprecated [email protected]: use uuid module instead
/usr/local/bin/tldr -> /usr/local/lib/node_modules/tldr/bin/tldr
[email protected] /usr/local/lib/node_modules/tldr
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

 ~> tldr ls
Page not found
Try updating with "tldr --update", or submit a pull request to:
https://github.com/tldr-pages/tldr

 ~> tldr --update
Updating...
/usr/local/lib/node_modules/tldr/node_modules/fs-extra/node_modules/rimraf/rimraf.js:312
        throw er
        ^

Error: EACCES: permission denied, unlink '/tmp/tldr/LICENSE.md'
    at Error (native)
    at Object.fs.unlinkSync (fs.js:932:18)
    at rimrafSync (/usr/local/lib/node_modules/tldr/node_modules/fs-extra/node_modules/rimraf/rimraf.js:305:17)
    at /usr/local/lib/node_modules/tldr/node_modules/fs-extra/node_modules/rimraf/rimraf.js:340:5
    at Array.forEach (native)
    at rmkidsSync (/usr/local/lib/node_modules/tldr/node_modules/fs-extra/node_modules/rimraf/rimraf.js:339:26)
    at rmdirSync (/usr/local/lib/node_modules/tldr/node_modules/fs-extra/node_modules/rimraf/rimraf.js:332:7)
    at Function.rimrafSync [as sync] (/usr/local/lib/node_modules/tldr/node_modules/fs-extra/node_modules/rimraf/rimraf.js:303:9)
    at Object.removeSync (/usr/local/lib/node_modules/tldr/node_modules/fs-extra/lib/remove/index.js:4:17)
    at Object.exports.download (/usr/local/lib/node_modules/tldr/lib/remote.js:19:6)

 ~> sudo tldr --update
sudo: tldr: command not found

 ~> sudo /usr/local/bin/tldr --update
Updating...
Done

 ~> tldr ls
Page not found
Try updating with "tldr --update", or submit a pull request to:
https://github.com/tldr-pages/tldr

~> mkdir -p ~/.tldr

~> tldr --update
Updating...
/usr/local/lib/node_modules/tldr/node_modules/fs-extra/node_modules/rimraf/rimraf.js:312
        throw er
        ^

Error: EACCES: permission denied, unlink '/tmp/tldr/LICENSE.md'
    at Error (native)
    at Object.fs.unlinkSync (fs.js:932:18)
    at rimrafSync (/usr/local/lib/node_modules/tldr/node_modules/fs-extra/node_modules/rimraf/rimraf.js:305:17)
    at /usr/local/lib/node_modules/tldr/node_modules/fs-extra/node_modules/rimraf/rimraf.js:340:5
    at Array.forEach (native)
    at rmkidsSync (/usr/local/lib/node_modules/tldr/node_modules/fs-extra/node_modules/rimraf/rimraf.js:339:26)
    at rmdirSync (/usr/local/lib/node_modules/tldr/node_modules/fs-extra/node_modules/rimraf/rimraf.js:332:7)
    at Function.rimrafSync [as sync] (/usr/local/lib/node_modules/tldr/node_modules/fs-extra/node_modules/rimraf/rimraf.js:303:9)
    at Object.removeSync (/usr/local/lib/node_modules/tldr/node_modules/fs-extra/lib/remove/index.js:4:17)
    at Object.exports.download (/usr/local/lib/node_modules/tldr/lib/remote.js:19:6)

 ~> ls -lh /tmp/tldr/
total 4.0K
-rw-r--r-- 1 root root 1.2K Dec 29 21:56 LICENSE.md
drwxr-xr-x 1 root root   58 Dec 29 21:56 pages/

 ~> tldr --update
Updating...
Done

 ~> tldr ls
  ls

  List directory contents.

  - List files one per line:
    ls -1
    ....

Environment

  • Operating system - Linux openSUSE Leap 42.2
  • NodeJS version zypper info nodejs4
    ...
    Repository : Main Update Repository
    Name : nodejs4
    Version : 4.6.1-3.1
    Arch : x86_64
    Vendor : openSUSE
    Installed Size : 12.7 MiB
    Installed : Yes
    Status : up-to-date

Hope it helps :)

`tldr sort` tries to find the `tldr-sort` command

This was extremely weird. I didn't bother to even try and find the source of this strange bug but I might later on.

tldr sort threw me the following error after correctly displaying the page for sort:

module.js:340
    throw err;
          ^
Error: Cannot find module '/usr/local/bin/tldr-sort'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3

This is just a bit silly, right? I tried tldr ls and it didn't have the problem.

Commands with spaces in them

It would be great if tldr git log returned me the page for tldr git-log.
A minor quality-of-life improvement.

I even have a crappy Bash wrapper to solve this for me: function t(){ local s=$([ -z "$2" ] && echo '' || echo "-$2"); echo tldr "$1$s"; }

npm fails to install tldr

Expected behaviour

tldr should install from npm just fine

Actual behaviour

npm install -g tldr fails with the output below

Log, debug output

~ $ sudo npm install -g tldr
npm WARN deprecated [email protected]: wrench.js is deprecated! You should check out fs-extra (https://github.com/jprichardson/node-fs-extra) for any operations you were using wrench for. Thanks for all the usage over the years.
npm WARN deprecated [email protected]: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
/usr/bin/tldr -> /usr/lib/node_modules/tldr/bin/tldr

> [email protected] postinstall /usr/lib/node_modules/tldr
> node ./bin/tldr --update

Updating...
/usr/lib/node_modules/tldr/node_modules/wrench/lib/wrench.js:481
            throw err;
            ^

Error: EACCES: permission denied, mkdir '/home/xingped/.tldr'
    at Error (native)
    at Object.fs.mkdirSync (fs.js:922:18)
    at mkdirSyncRecursive (/usr/lib/node_modules/tldr/node_modules/wrench/lib/wrench.js:466:12)
    at Object.mkdirSyncRecursive (/usr/lib/node_modules/tldr/node_modules/wrench/lib/wrench.js:473:17)
    at /usr/lib/node_modules/tldr/lib/cache.js:55:12
    at Extract.<anonymous> (/usr/lib/node_modules/tldr/lib/remote.js:28:5)
    at emitNone (events.js:91:20)
    at Extract.emit (events.js:185:7)
    at DirWriter.<anonymous> (/usr/lib/node_modules/tldr/node_modules/unzip2/lib/extract.js:42:10)
    at emitNone (events.js:91:20)
npm ERR! Linux 4.4.0-21-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "tldr"
npm ERR! node v6.5.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `node ./bin/tldr --update`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script 'node ./bin/tldr --update'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the tldr package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./bin/tldr --update
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs tldr
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls tldr
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/xingped/npm-debug.log

Environment

  • Operating system - Linux Mint 18
  • NodeJS version - 6.5.0

Add --random-example to get a single example as random

--random is great to get a random page, but a single random example would be nice, for example to show a new "did you know" or "command of the day" on startup.

For examples:

$ tldr --random-example

   find the process that opened a local internet port
   lsof -i :8080

error: unknown option `--list'

Hi,

I just installed tldr through npm install -g tldr and when I try to get the list of known commands, I'm greeted with error: unknown option --list.

Note that I'm using nvm, so tldr is installed in /home/tca/local/etc/nvm/v0.10.21/bin/tldr if that's relevant.

Same error goes with tldr --update as well.

Backticks in example description messes up output

For eg - check the 'common/ssh.md' page.

This line -

- Enable the option to forward the authentication information to the remote machine (see `man ssh_config` for available options):

causes "man ssh_config" to appear as an example.

Clean up list output

Something more user friendly, like

$ tldr --list

chown
cp
du
du(osx)
md5
open
ssh
tar

or wince we have a lot of commands now, maybe even

$ tldr --list

chown cp du du(osx)
md5 open ssh tar

since both are grep friendly.

--update appears to succeed then hangs

Ran into an issue when I was trying to get up and running.

=> tldr --update
Updating...
Done
|                <--- Cursor remains here indefinitely

Used ctrl + c to quit and then tried to run tldr --update again and got this:

=> tldr --update
Updating...
Error: invalid signature: 0xa0000
    at /usr/local/lib/node_modules/tldr/node_modules/unzip2/lib/parse.js:63:13
    at processImmediate [as _immediateCallback] (timers.js:374:17)

which is discussed in Issue #12.

I downloaded version 1.01 via npm today.

Thoughts?

Cannot apply color configuration

Expected behaviour

The color should be changed

Actual behaviour

The color didn't change at all

Log, debug output

I added .tldrrc file to my $HOME folder with this content:

{
"colors": {
"text": "green",
"command-background": "black",
"command-foreground": "red",
"command-token": "white"
}
}

But TLDR doesn't take the effect at all. How can I change the color?

Environment

OSX Sierra
0.12.5

Option to output everything

First, this is rad :)
Since every command is byte size, I wanted an option to output everything and read it out to find out about commands I didn't know.
I tried to add an '--all' option, but then realized that cache.list returns also unavailable commands (e.g. apt-get on osx).
I think cache.list should return only platform-relevant commands. Then iterating over cache.list with tldr.get is a trivial implementation of this feature.
If you think this is a good idea I'll submit a pull request

vim.md renders incorrectly

Expected behaviour

tldr client should display <Esc>i, <Esc>u, <Esc>/search_pattern<Enter> (search_pattern underlined)

Actual behaviour

tldr client displays P, N, $

On screenshot I have highlited difference between markdown file (yellow) and tldr output (orange).
bug

Environment

  • Operating system - Linux, Ubuntu 16.04
  • NodeJS version - v4.2.6

README is misleading regarding the themes

The default theme installed by the client is the "simple" one (per config.json#L41), but this isn't pointed out in the configuration section of the readme. Further adding to the confusion is that the screenshot doesn't mention that this is a customized installation with a different theme set up.

The readme should mention both details, so that people know what to expect. This came up today on Gitter, and likely others have had the same doubts.

ROADMAP

List of bugfixes and feature ideas in the pipeline.
We can reference the actual issues from here as they get created.

1. Remote repository

Get feedback on the following things:

1.1 Update process

  • should we always download HEAD?
  • or from the latest tag (i.e. stable pages)

1.2 Smart updates

  • we could remember the latest tag/sha downloaded, and the date
  • and say "Nothing to update" if that's the case
  • or prompt the user to update if it's been too long

1.3 Config management

Can we simplify this, with implicit defaults like npm does?
Some of it could also move to the .tldrrc config, for example:

{
  "repository": "user/tldr#branch"
}

1.4 See if the contribution workflow works

For example:

  • fork and create a branch
  • add a new page, e.g. ssh
  • point your client to it { "repository": "myfork/tldr#branch" }
  • download the latest content
    • either with tldr --update if we always download HEAD
    • or with tldr --update --preview if we usually only get stable tags
  • then tldr ssh to see the page

tldr-node can't render page with 2 line backtick quotes

From the official page lib, here are some pages with 2 or multi-line backtick quotes, for example:
https://github.com/tldr-pages/tldr/blob/master/pages/common/zpool.md

- Show the history of all pool operations

`zpool histrory {{poolname}}`

- Create a mirrored pool.

`zpool create {{poolname}} mirror {{disk1}} {{disk2}}`
`zpool create {{poolname}} mirror {{disk1}} {{disk2}} mirror {{disk3}} {{disk4}}`

which is displayed in the web client and C++ client, but cause blank in this node client with version 1.3.0.

Here is the output:

➜  ~ tldr zpool

  zpool
  Manage ZFS pools

  - Show the configuration and status of all ZFS zpools
    zpool status [poolname]

  - Check a ZFS pool for errors (verifies the checksum of EVERY block). Very CPU and disk intensive.
    zpool scrub poolname

  - List zpools available for import
    zpool import

  - Export a zpool (unmount all filesystems)
    zpool export poolname

  - Show the history of all pool operations
    zpool histrory poolname


➜ ~ 

I think this is a legal grammar to let user know a little more detailed usage for current command. So could you fix this problem?

No color in Cygwin?

In cygwin.
In Cent7.

I use Mintty with zsh. Mintty is set to xterm-256color. Identical .zshrc.
Editing .tldrrc doesn't work as I believe it's never loaded. I tried putting it in ~/ and in C:\Users\user.
I'm using the latest version.

tldr --update fails

I just installed this from master (npm install -g tldr-pages/tldr-node-client), then tried to update:

$ tldr --update
body: {"message":"Not Found","documentation_url":"https://developer.github.com/v3"}
status: undefined

TypeError: Cannot read property 'length' of undefined
    at /usr/local/lib/node_modules/tldr/lib/cache.js:38:15
    at Request._callback (/usr/local/lib/node_modules/tldr/lib/request.js:50:7)
    at Request.self.callback (/usr/local/lib/node_modules/tldr/node_modules/request/request.js:121:22)
    at Request.EventEmitter.emit (events.js:98:17)
    at Request.<anonymous> (/usr/local/lib/node_modules/tldr/node_modules/request/request.js:978:14)
    at Request.EventEmitter.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/tldr/node_modules/request/request.js:929:12)
    at IncomingMessage.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:919:16
    at process._tickCallback (node.js:419:13)

Without this, nothing else seems to work, e.g. tldr ls says I need to run with --update first.

Output is really hard to read

I'm finding the output rather difficult to read on Ubuntu. Here's a screenshot:

tldr output

The repo doesn't specify which colour names are valid, and so I don't know what to change it to in my .tldrrc file.

Color themes support

  • Implement several themes that should look good on either black or white terminal.
  • Themes should be just preset colors.
  • Current theme can be set in config file.
  • The default theme should be colorless.

See discussion in #39

Some pages under common inaccessible

I've got the latest version of this client (freshly installed) and --update regularly. Today I noticed I couldn't access the page for wget, under common.

I probed around a bit and discovered a very strange trend, which I hope is coincidental. All commands that come behind touch in the alphabet can't be found. The ones before like tmux are displayed as normal. I tried a lot of other pages that come after touch and I can't open any of them.

I didn't know where the cache is stored but it may have something to do with that?

`npm run lint` failed

I'm submitting a PR, and found lint error.

 npm run lint                                                                                                                             [094f795]

> [email protected] lint /Users/taowang/lab/node.js/tldr-node-client
> eslint lib test bin/tldr


/Users/taowang/lab/node.js/tldr-node-client/lib/config.js
  66:21  error    Expected indentation of 4 spaces but found 20  indent
  67:21  error    Expected indentation of 4 spaces but found 20  indent
  68:21  error    Expected indentation of 4 spaces but found 20  indent
  69:21  error    Expected indentation of 4 spaces but found 20  indent
  70:21  error    Expected indentation of 4 spaces but found 20  indent
  71:21  error    Expected indentation of 4 spaces but found 20  indent
  72:21  error    Expected indentation of 4 spaces but found 20  indent
  73:21  error    Expected indentation of 4 spaces but found 20  indent
  74:21  error    Expected indentation of 4 spaces but found 20  indent
  75:21  error    Expected indentation of 4 spaces but found 20  indent
  76:21  error    Expected indentation of 4 spaces but found 20  indent
  77:21  error    Expected indentation of 4 spaces but found 20  indent
  78:21  error    Expected indentation of 4 spaces but found 20  indent
  79:21  error    Expected indentation of 4 spaces but found 20  indent
  80:21  error    Expected indentation of 4 spaces but found 20  indent
  81:21  error    Expected indentation of 4 spaces but found 20  indent
  82:21  error    Expected indentation of 4 spaces but found 20  indent
  83:21  error    Expected indentation of 4 spaces but found 20  indent
  84:21  error    Expected indentation of 4 spaces but found 20  indent
  85:21  error    Expected indentation of 4 spaces but found 20  indent
  86:21  error    Expected indentation of 4 spaces but found 20  indent
  87:21  error    Expected indentation of 4 spaces but found 20  indent
  88:21  error    Expected indentation of 4 spaces but found 20  indent
  89:21  error    Expected indentation of 4 spaces but found 20  indent
  90:21  error    Expected indentation of 2 spaces but found 20  indent
  91:3   warning  Unexpected 'todo' comment                      no-warning-comments

/Users/taowang/lab/node.js/tldr-node-client/lib/utils.js
  17:3  warning  Unexpected 'todo' comment  no-warning-comments

/Users/taowang/lab/node.js/tldr-node-client/bin/tldr
  77:3  warning  Unexpected 'todo' comment  no-warning-comments

✖ 28 problems (25 errors, 3 warnings)

I didn't touch those files or lines, I think it's might because the lint check had been turned off for some commits.

Error in tldr git

This only happens in git, the rest of the command seems ok.

tldr git                                                                                                                                                              
/usr/local/lib/node_modules/tldr/node_modules/marked/lib/marked.js:1226
    throw e;
          ^
TypeError: Cannot set property 'code' of undefined
Please report this to https://github.com/chjj/marked.
    at Renderer.r.codespan (/usr/local/lib/node_modules/tldr/lib/parser.js:47:32)
    at InlineLexer.output (/usr/local/lib/node_modules/tldr/node_modules/marked/lib/marked.js:664:28)
    at Parser.tok (/usr/local/lib/node_modules/tldr/node_modules/marked/lib/marked.js:1075:50)
    at Parser.tok (/usr/local/lib/node_modules/tldr/node_modules/marked/lib/marked.js:1033:22)
    at Parser.parse (/usr/local/lib/node_modules/tldr/node_modules/marked/lib/marked.js:935:17)
    at Function.Parser.parse (/usr/local/lib/node_modules/tldr/node_modules/marked/lib/marked.js:922:17)
    at marked (/usr/local/lib/node_modules/tldr/node_modules/marked/lib/marked.js:1218:19)
    at Object.exports.parse (/usr/local/lib/node_modules/tldr/lib/parser.js:50:3)
    at /usr/local/lib/node_modules/tldr/lib/tldr.js:89:23
    at /usr/local/lib/node_modules/tldr/lib/cache.js:22:5

Can't see pages in the common directory

Expected behaviour

Running tldr inkscape should yield a tldr page.

Actual behaviour

Try updating with "tldr --update", or submit a pull request to:
https://github.com/tldr-pages/tldr

Environment

Key Value
Operating system Linux Snowflake 4.2.0-16-generic #19-Ubuntu SMP Thu Oct 8 15:35:06 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
NodeJS version v5.9.0

Move to a git based fetch/update client

This gives us benefits already mentioned here - #9 (comment)

Citing them again for easy lookup-

Speed: Incremental changes

We get incremental changes pulled in: a fetch can download as many revisions as required, 1 being what's considered a shallow clone. Alternatively --depth is provided at the git clone (and thus git fetch as well) level to specify the amount of revisions to be fetched for the initial setup.

Note: running git fetch --depth 1 https://github.com/tldr-pages/tldr master:master only downloads 205.17 KiB on a clean git init . repository. Fetching in the last merged change (from tldr-pages/tldr@35b685f to tldr-pages/tldr@093bb6f) means fetching in 2 compressed commits. I've measured using this script and the output is below:

repos/tldr λ ./size.sh 093bb6f..35b685f
3       package.json
total 3

3 mere uncompressed bytes. Now throw in Packfile compression.

Speed: Smart Protocol

If the user setups ssh access, we get the benefits of using the "start" protocol: https://git-scm.com/book/en/v2/Git-Internals-Transfer-Protocols#The-Smart-Protocol

Speed: Compression

The content comes stored in compressed form by default: https://git-scm.com/book/en/v2/Git-Internals-Packfiles

Integrity

Not only content is SHA-1 verified upon transfers (https://git-scm.com/book/en/v2/Git-Internals-Git-Objects) but can be further verified very cheaply at any point in time to ensure consistency.

"command-background": "white" is not white

I'm trying to make tldr to look good on the default Mac OSX Terminal white background, and tried setting command-background to white in ~/.tldrrc. But it seems like the rendered color is not actually white.

210x50-1

List of SunOS tldr pages

Expected behaviour

List all available tldr pages for SunOS

Actual behaviour

tldr --list --sunos tldr --list --sunos, tldr -o sunos --list, tldr --list -o sunos lists all tldr pages for the linux platform.

If I try to do tldr --sunos; tldr --list or tldr -o sunos; tldr --list it gives the usage, followed by all tldr pages for the linux platform.

Environment

  • Ubuntu 16.04
  • NodeJS 4.2.6
  • tldr-node-client 1.7.1

tldr has trouble displaying *file* part on console

Expected behaviour

tldr tac should show:


tac

Print and concatenate files in reverse.

  • Print the contents of file1 reversed to the standard output:

    tac {{file1}}


This is the correct behavior of web client.

Actual behaviour

However, on console it actually shows


tac

Print and concatenate files in reverse.

  • Print the contents of  reversed to the standard output:

    tac {{file1}}


Here the file1 part (*file1* in Markdown) of the description is missing.

Log, debug output

Environment

  • Operating system - OSX
  • NodeJS version - v5.9.0

Bold text is deleted

This client handles bold text incorrectly. In Markdown, when some text is surrounded with asterisks, it should be made bold. This client, however, completely removes the text instead of emboldening it. The tldr page csvcut is an example of this; in the third example, the word "except" is completely removed.

screen shot 2016-02-05 at 11 55 15 am

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.