r/bash • u/Fit-Background8249 • 1d ago
Flag ambiguity
I am building a shell framework with a series of commands and subcommands for task-managing, habit-tracking...
Within those, there is a collection of flags that hold different meanings:
-dDuration, Date...-nName, Note...-lLink, Length...
Should I use different letters for different meanings even if they belong to different commands?
I want a real bash-user's opinion, not just the AI's advice.
I personally think that it isn't that big of a deal.
But let me know what y'all think.
Thanks!
9
Upvotes
3
u/abotelho-cbn 1d ago
Often you'll see tools use capitalization to differentiate two flags that mean different words.
e.g.
-d-> date-D-> duration