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

fix: keep the script compatible with Busybox applets #345

Merged
merged 2 commits into from
Feb 6, 2024

Conversation

folliehiyuki
Copy link
Contributor

  • Use short flags for sort command
  • Remove -n flag for nl command. The numbers in the selection list won't be aligned anymore, but no information is lost.

The current arguments are only presented in GNU's coreutils.

Check list

  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation

Description

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Breaking change
  • Documentation change

Test environment

  • Shell
    • bash
    • zsh
    • fish
  • OS
    • Linux
    • Mac OS X
    • Windows
    • Others:

Keep it compatible to Busybox's sort implementation.
-n flag doesn't exist in Busybox's nl implementation
Copy link
Collaborator

@sandr01d sandr01d left a comment

Choose a reason for hiding this comment

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

Everything working as before on my end. The numbers from the selection are correctly aligned for me. Seems like -n rn is the default behavior of GNU nl.

Copy link
Owner

@wfxr wfxr left a comment

Choose a reason for hiding this comment

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

LGTM

@cjappl cjappl merged commit 2eda2a4 into wfxr:master Feb 6, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants