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

[osc] Use busybox compatible commands for completion #3

Closed
wants to merge 2 commits into from

Conversation

nephros
Copy link

@nephros nephros commented Feb 14, 2024

I know it's a bit trivial, but non-busybox-compatible use of date(1)
is very annoying when using tab-command-completion

Fixes this behaviour:

osc s<TAB>

osc sdate: invalid date '2023-09-20 18:20:56.234292273 +0200'
date: invalid date 'now'

Copy link
Contributor

@Thaodan Thaodan left a comment

Choose a reason for hiding this comment

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

Please submit the patch to upstream.

- typeset -i ctime=$(command date -d "$(command stat -c '%z' ${projects})" +'%s')
- typeset -i now=$(command date -d now +'%s')
+ typeset -i ctime=$(command stat -c '%Z' ${projects})
+ typeset -i now=$(command date -D -F +'%s')
Copy link
Contributor

Choose a reason for hiding this comment

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

This breaks the competition when not using busybox.

Copy link
Author

Choose a reason for hiding this comment

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

Yeah well which involves installing gnu-coreutils - which probably will break stuff i a lot of places but I haven't tried.

Anyway, turns out an option-less call works for BB and GNU.

Copy link
Contributor

Choose a reason for hiding this comment

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

Installing coreutils doesn't break anything it just requires you to replace the busybox-symlink packages with coreutils.

@nephros
Copy link
Author

nephros commented Feb 14, 2024

Please submit the patch to upstream.

Alrighty: openSUSE/osc#1487

@pvuorela
Copy link

Now that the change is upstream, is there a burning need for this one or should we just wait for a new upstream release to be synced? Seems like they are getting done relatively often.

@nephros
Copy link
Author

nephros commented Feb 21, 2024

Now that the change is upstream, is there a burning need for this one or should we just wait for a new upstream release to be synced? Seems like they are getting done relatively often.

Fine! Closing this, hoping for a bump soonish ;)

@nephros nephros closed this Feb 21, 2024
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.

3 participants