julienXX / terminal-notifier

Send User Notifications on macOS from the command-line.
Other
6.38k stars 330 forks source link

Stylistic conflict with conventional command line flag passing #245

Open rien333 opened 6 years ago

rien333 commented 6 years ago

Although this app is very handy, I use it quite infrequently. Whenever I find a use case for it however, I almost always get the command line flags wrong because they break some very basic unixy command line flag passing conventions, for, I think, no apparent reason.

Any other command line utilty with long, verbose command line flags usually uses two dashes to pass them , e.g.: --ignore-errors (taken from the youtube-dl manual) . Some include an additional, but equivalent short hand notation as well, for when the user for example doesn't need the verbosity and already understands how the utility works: -i, --ignore-errors (again taken from youtube-dl)

So, as an example within the terminal-notifier options of adhering to the conventional pattern described above:

-m/--message VALUE    The notification message.

While the current terminal-notifier syntax does some kind of (imo ugly and hard to remember) hybrid both:

-message VALUE    The notification message.

Is there any reason for this choice? And would it be a good idea to add shorthand options? (typing message everytime is a bit long for example, and I'm a super bad speller) Of course, completely changing the syntax will break many scripts all over the place. To solve this, one could for example add a message that mentions that the old syntax is deprecated, for example. (other fixes are possible tho, such as leaving the old syntax in place, but documenting the conventional one)

julienXX commented 6 years ago

@rien333 This would be nice but it will be painful for all the scripts that use terminal-notifier. Since terminal-notifier is mostly used like this or as a dependency I would prefer to have both syntax available for a while. Would you be interested in submitting a pull request?

rien333 commented 6 years ago

Yes, I might try whenever I find the time the coming week! Not 100% sure though.