Skip to content
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

shuf(1) is not part of POSIX, neither is 'sort -R' #45

Merged
merged 4 commits into from
Jan 8, 2021

Conversation

jschauma
Copy link
Contributor

This should address issue #44.

@ghost
Copy link

ghost commented Dec 2, 2020

Looks good. Just tried that on OpenBSD and then realised that seq(1) is also not part of POSIX.

Solution found on Stackexchange with awk(1) here.

Do you mind implementing that too or should I create another PR?

@jschauma
Copy link
Contributor Author

jschauma commented Dec 2, 2020 via email

@ghost
Copy link

ghost commented Dec 2, 2020

Looks good. Thanks!

This had been removed here to allow running the tool when w3m
is not installed; a better way would be to move the check until
after options have been parsed and possibly an alternate browser
has been requested.  But that would be a different change set /
PR, so putting this back here for now.
tmpmail Outdated
@@ -282,7 +284,7 @@ print_error() {

main() {
# Iterate of the array of dependencies and check if the user has them installed
for dependency in jq curl; do
for dependency in jq w3m curl; do

Choose a reason for hiding this comment

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

Same question and extension to check for required tools dependent on cli options would apply for:

awk, sort, cut, tail

@sdushantha
Copy link
Owner

A new feature was added in #46 and it uses seq. Would you like to update the code to not include it?

@sdushantha sdushantha added the enhancement New feature or request label Jan 8, 2021
@jschauma
Copy link
Contributor Author

jschauma commented Jan 8, 2021 via email

@sdushantha sdushantha merged commit 0c044b5 into sdushantha:master Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants