-
Notifications
You must be signed in to change notification settings - Fork 127
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
Better/More detailed --list #334
Comments
Thanks! My first impression is that this does not really sound like something that users would do often. Additionally, I think that it should not be too difficult to implement the desired behavior as a short shell script instead. What do you think? |
tbh, I wouldn't know how to write this shell script, it would probably be quicker to google the command I am looking for... |
columns may make the output easier on the eyes but the current impl is actually better for other tools like |
Does this Python script solve your problem? #!/usr/bin/env python3
import subprocess
commands = subprocess.run(
["tldr", "-l"],
capture_output=True,
encoding="utf-8",
).stdout.splitlines()
for command in commands:
output = subprocess.run(
["tldr", command],
capture_output=True,
encoding="utf-8",
).stdout
description = output.lstrip().split("\n\n")[0]
description = " ".join(description.split())
print(f"{command} => {description}") Looking at the output, I would argue that it is hard to display all of this information in a concise or useful way |
Closing because the script seems sufficient (and is mentioned in the manual now) :) |
Awesome tool!
I think it would be useful to have two columns in --list with the command and the 1 line description of the command next to it. This would help discovering new commands or remember a command name by grepping a keyword.
The text was updated successfully, but these errors were encountered: