-
Notifications
You must be signed in to change notification settings - Fork 9
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 shorter flags for options that are used often #48
Conversation
…kages-select and packages-up-to Signed-off-by: Kenji Brameld <kenjibrameld@gmail.com>
Does anyone have thoughts on this? |
Since package selection flags apply to all of the main However, given that package selection flags are pretty important for cc @cottsay @emersonknapp, since you commented on/authored that other PR |
Personally I think it's smart - I have a lot of colcon aliases because of the verbosity of common workflows. But I'm not a decision maker on colcon, so I can just lend my opinion |
It seems like colcon is missing a decision maker.. (fair enough). who would be appropriate to @ to get this proceeding? |
I'll express a nay vote for this PR. Coming from the vim and mercurial heritage I've got, I really enjoy command interfaces where you only need to specify enough characters to uniquely identify the intended command. However, a major limitation of that style is that it places restrictions on the command vocabulary and forces you to either break compatibility or never add an command which conflicts with a previously acceptable shortened spelling. Additionally, adding single letter flags doubles (at least) the amount of context someone needs to have in order to mentally process a colcon command. Shorter flags are often overloaded mnemonically ("does It seems that most command line interfaces these days prefer longer option flags combined with robust completion/suggestion interfaces and I believe that colcon already supports this on most platforms. Given colcon's design for extensibility I think that doubling the potential interface size by introducing short flags is probably going to create more usability problems than standardized short flags would resolve. Designing your own shell functions and aliases to streamline common workflows also works and I believe there are some additional colcon extensions, colcon-alias and colcon-defaults to name a few, which can also help reduce the typing involved. |
Thanks @nuclearsandwich for your thoughts. All of the points you made are valid and explain the downsides of this move well. One thing that I want to add (or disagree), is relying on auto-completion for a long command. When ssh'd into a remote machine, or when working on a slow machine like a rapsberry pi, auto-completion can be quite slow. That leaves the user with the option of typing the whole flag out (with chances of typos), or waiting a non-trivial amount of time for auto-completion to return the candidates (or sometimes hanging for so long that you start bashing Ctrl+C). That's when I'd prefer shorter flags. Also, auto complete isn't enabled by default in colcon, so I don't think we should straight up assume most people have it enabled. But again, I understand the points you raised and I'm happy to look for some better solution if one exists. |
I think disagreement, or perhaps more precisely dissent, is entirely welcome especially when well explained. This question, like a lot of maintenance decisions which are largely preferential or in the pursuit of "sensible defaults" will probably be revisited periodically as new users experience similar friction and propose revisiting these decisions and while I am not encouraging anyone to spam us with requests for short args, there could come a time when implementing them becomes the best answer to the problem and having both the maintainer and dissenting positions well laid out helps us to quickly get up to speed on what has and hasn't changed since the last time a discussion was had.
This is a valid point, those who are coming to colcon via the ROS 2 tutorials are encouraged to set up autocompletion but it's an easy to ignore step as nothing breaks if you don't do so. I've left some thoughts in the linked issue about how we could make setting up autocomplete slightly more user friendly but do to the architecture of autocompletion in most shells it is unlikely to ever be fully automatic.
I've tried to avoid mentioning this because at best it's a weird flex 💪🏼 and at worst it is me being very smug, but I don't have autocompletion enabled for anything but filenames and even then I try not to lean too hard on it (you only combine but (and this is the reason I bring up my weird flex above) I do think that there is another alternative for ergonomics beyond shortening flags and autocompletion which is user-customization. I neglected to save them on an earlier workstation I had a shell function called |
Thanks @nuclearsandwich for your detailed thoughts, and others for your opinions. I'm going to close this PR off as I don't see any ways to go about improving it, but I believe the discussion in this thread will serve as a good starting point for any future discussion about this! |
Having shorter flags would save a lot of time (even when compared to using autocompletion).
packages-select
andpackages-up-to
were just the two commands that I believe is used a fair bit.If these changes are fine, we could look into adding ones for other commonly used flags.
Signed-off-by: Kenji Brameld kenjibrameld@gmail.com