Skip to content

fix: return str instead of list when executing tldr -l #222

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

Merged
merged 3 commits into from
Jan 21, 2024

Conversation

uunnxx
Copy link
Contributor

@uunnxx uunnxx commented Oct 29, 2023

Return str separated by \n.

It helps when using by other programs, like fzf
I've alias:
alias ch="tldr \$(tldr -l | fzf)"
so it'll search through all pages.

focused_window_2023-10-29_09-24-04_900x450

Closes #221.

@kbdharun kbdharun added the hacktoberfest-accepted PRs which are eligible for hacktoberfest but won't get merged before 31st label Oct 29, 2023
Copy link
Member

@acuteenvy acuteenvy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks the --search option. All you need to do to output the list as a newline-separated string is to change

print(get_commands(options.platform))

to

print('\n'.join(get_commands(options.platform)))

on line 507.

@vitorhcl
Copy link
Member

@kbdharun @acuteenvy as this is a minor change, I think you can apply @acuteenvy's suggestion and merge this

@vitorhcl vitorhcl self-requested a review January 21, 2024 04:34
Copy link
Member

@kbdharun kbdharun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks for your contribution.

@kbdharun kbdharun merged commit 7d15d2c into tldr-pages:main Jan 21, 2024
@kbdharun kbdharun added this to the 3.3.0 milestone Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted PRs which are eligible for hacktoberfest but won't get merged before 31st
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The reason of returning list when tldr -l
4 participants