Comments (5)
We could simply check if the pages/common/tldr.md
file exists, as a proxy for a dedicated init file :) would that work?
from tldr-node-client.
Note that npm's documentation recommends not to use sudo
while doing install -g
. But anyways, yes we can easily fix the documentation on the main site. It is mentioned in the node client repo though.
Having said that, I am not saying that we should go on with the post-install approach. Its quirky and unexpected. Coming to a proper fix, doing it in the first run would need state to be maintained in the client. We can write to a file saying that tldr
has run for the first time, but that seems a bit crude. And then you have to check that file every time you run the command. I am open to other suggestions. :)
from tldr-node-client.
Hmm .. I am thinking something like this - if we do not run the --update
command post install, cache will be empty. So, upon running any command, if that page is not found, it can simply run the --update
and populate the cache. This has the advantage of not running any side logic of checking whether tldr
is being run for the first time or not, and also automatically solves #9 too.
Only downside is it hurts the first use. But I guess its a decent tradeoff.
from tldr-node-client.
Well, the first use can be just delayed (wait for the update to conclude), not outright skipped, in case you were thinking of such a workflow. This is what Homebrew does, IIRC.
from tldr-node-client.
the first use can be just delayed (wait for the update to conclude), not outright skipped,
Of course I meant delayed :) But yea .. it still hurts.
from tldr-node-client.
Related Issues (20)
- "SyntaxError: Unexpected end of JSON input" ocuurs when search HOT 3
- > It is a reasonable request. But since the pages are internal to your team, I am wondering how much effort is it to just periodically fetch the master pages and add your local set of pages. If there are multiple remote sources to merge from, that would be a valid request as keeping multiple sources in sync would be difficult. HOT 1
- tldr --update failed HOT 2
- zsh autocompletion fails with: `(eval):1: bad pattern: [[`
- Version 3.3.8 is not available in npm, latest there is 3.3.7 HOT 7
- Language argument support HOT 1
- ENH: Mention number of new commands when doing `tldr -u` and maybe output a list of new commands as well
- Rendered emails become URL-encoded
- Highlight generic path placeholders differently
- Highlight number, string and boolean placeholders differently
- Transition from master to main branch HOT 2
- Permission error when running tldr HOT 1
- Feature request: update only specific languages in cache HOT 1
- bug: update command breaks when tldr repo has bad merge HOT 3
- Fetch individual translation archives for cache based on the environment variable configuration HOT 2
- Rendered output displays "See also:" line twice HOT 4
- Client specification v2.1 compliance: add placeholder escaping support
- Cannot update cache on Windows
- `tldr --list` output should be not in a single line
- `repository` in the config is not used anymore HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tldr-node-client.