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

Add case insensitive sorting of applications #137

Merged
merged 6 commits into from
Aug 25, 2023

Conversation

nabakolu
Copy link
Contributor

This patch adds the -c, --case-insensitive option, which makes the alphabetical sorting of the applications be done by a utility function that sorts them case insensitively.

    added new option -c, --case-insensitive
    added new utility function for case insensitive string sorting
    added sorting by this function when option is set
@enkore
Copy link
Owner

enkore commented Aug 2, 2023

Thank you, I have two suggestions

  • I think using strncasecmp portably requires including <strings.h>, these being defined by string.h (without -s) seems to be a glibcism
  • -i might be a more conventional choice for case insensitivity (e.g. grep)

@nabakolu
Copy link
Contributor Author

nabakolu commented Aug 3, 2023

Yes strncasecmp is defined in strings.h.
I included <strings.h> and changed the -c to -i

Also merged the updated develop branch

@enkore enkore merged commit 65b1358 into enkore:develop Aug 25, 2023
@enkore
Copy link
Owner

enkore commented Aug 25, 2023

Thanks!

This was referenced Sep 12, 2023
meator added a commit to meator/j4-dmenu-desktop that referenced this pull request Feb 15, 2024
This also readds case insensitive sort added in enkore#137.

closes enkore#144

Co-authored-by: nabakolu <lnabakowski@mailo.com>
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.

2 participants