Comments (12)
I know this thread is long dead, but incase anyone stumbles on this while Googling a solution, I use a help
function defined in my .bashrc
to set man as a fallback:
help() {
tldr "$@" 2>/dev/null || { echo "No tldr entry for $1 (try tldr --update)"; man "$@" }
}
If you dont like that man is fullpage, use a different pager than the default (less
). E.g. to print only the first 50 lines of the manpage:
help() {
tldr "$@" 2>/dev/null || { echo "No tldr entry for $1 (try tldr --update)"; MANPAGER="head -n50" man "$@" }
}
from tldr.
Maybe a short message saying "Sorry, no tldr page yet. Create one at [url]!" then a 2 second pause before loading the man page?
from tldr.
I'm not sure about the auto-opening, especially since man pages go full-screen.
Maybe a prompt like this?
No TLDR page for "ssh" yet.
Please consider contributing to the project.
- Press [o] to browse to http://github.com/rprieto/tldr
- Press [m] to open the man page instead
- Press any other key to exit
Although that's a change from the usual tldr
behaviour which is to print something and exit.
from tldr.
Ooh, I really like @rprieto's idea. Would [o]
just do something like open http://github.com/rprieto/tldr
? (I know that opens the default browser on OSX, but not sure about other *nix).
from tldr.
That's what I had in mind, let's find the other *nix equivalents!
from tldr.
Hmm. Looks like there really aren't any other *nix equivalents, but you could check if chrome / firefox is installed and call them.
from tldr.
Some pointers here, but indeed it seems there's no universal solution.
from tldr.
I don't have a Linux machine handy to try it, but ghwd uses:
# mac and linux-compatible open
open=open
command -v xdg-open && open=xdg-open
$open $url
from tldr.
That's what is pointed out in the SO post I linked to. A comment there says it doesn't work on RHEL, but I suppose apart from that its support base is probably wide enough for a start. Besides, if someone can eventually contribute something better, there are always issues and pull requests :)
from tldr.
Sorry, I was on the train and hadn't read your link yet 😬
You're right this should be a good start!
from tldr.
Just moving this issue over to tldr-node-client #9.
Each client can probably do it their own say, but I'll start work over there :)
from tldr.
Nice trick, thanks for sharing @ChrisCummins! By the way, do you think you could have any input in #527? We got a little blocked trying to come up with some generic shell scripting to implement that idea.
from tldr.
Related Issues (20)
- Page translation request: Urdu
- Proposal: enforce 2FA requirement for Org members and collaborators HOT 11
- MAINTAINERS: add @fazlearefin as collaborator HOT 2
- page modification request: git clone HOT 2
- script: detect broken "More information" links HOT 8
- Proposal: document all periodic maintenance tasks HOT 1
- Let's document: Netpbm (missing commands) HOT 6
- Proposal: share wiki contents in the repository HOT 1
- Proposal: remove `--help` and `--version` flags from pages HOT 14
- Let's document: onehost HOT 2
- decision/docs: keep or change the approach for #8786 and #7596 and document this
- Page modification request: mpc HOT 1
- MAINTAINERS: add @noraj as collaborator HOT 2
- Page request: mypy HOT 3
- Page request: ruff
- Page request: snakemake HOT 1
- Document optional placeholders in style guide
- Page request: tqdm
- Page request: pipes.sh
- Rendering a single pair of curly braces outside of a placeholder is impossible
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.