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

scrot -sf stopped working #178

Closed
umanwizard opened this issue Jan 9, 2022 · 3 comments
Closed

scrot -sf stopped working #178

umanwizard opened this issue Jan 9, 2022 · 3 comments

Comments

@umanwizard
Copy link

since 95bea6b , we can't use -s as a short option (e.g., instead of -sf, we now have to type -s -f, because otherwise f is interpreted as an argument to -s.).

This has broken some scripts of mine on upgrading to Ubuntu 22.04 pre-release.

I believe that it is against standard command-line flag conventions to have -s take an argument despite being a short option.

umanwizard added a commit to umanwizard/fwm that referenced this issue Jan 9, 2022
@daltomi
Copy link
Collaborator

daltomi commented Jan 10, 2022

The --select option now expects an optional argument.

Using the short option (-s) with the optional argument is valid, according to here:
getopt(3) — Linux manual page
Two colons mean an option takes an optional arg; if there is text in the current argv-element (i.e., in the same word as the option name itself, for example, "-oarg"), then it is returned in optarg, otherwise optarg is set to zero.

Ex:
-o arg default argument
-o default argument
-oarg optional argument given

@umanwizard
Copy link
Author

That is a fair point, but it's still the case that scripts that were previously broken (because e.g. they invoke scrot -sf) are now broken.

@daltomi
Copy link
Collaborator

daltomi commented Jan 11, 2022

I don't like breaking behaviors just for the sake of it, but I don't think that's dogma either 🔥
The new features (hide/hold/blur) are tied to selection and the only way the user communicates with us is through arguments and the best place for this was for the --select option to determine the behavior.
Anyway, I see that you already solved the problem easily.

@daltomi daltomi closed this as completed Jan 11, 2022
@daltomi daltomi pinned this issue Jan 11, 2022
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

No branches or pull requests

2 participants