News for hackers. Stuff that matters.
Re:Start all of your commands with a comma (2009) by aendruk on Thursday June 23, 2022 @04:44PM (#31854914)
I tend to give programs longer, more descriptive names and then do the short names as shell aliases. That way there’s little risk of name collision for the original program, scripts using the canonical name remain readable, and the shorthand is free to evolve to fit varying work habits.
Re:Start all of your commands with a comma (2009) by quasarj on Thursday June 23, 2022 @04:48PM (#31854963)
My keyboard came with a tab key, so I don't worry about my commands having short names.
Re:Start all of your commands with a comma (2009) by keybored on Thursday June 23, 2022 @05:07PM (#31855169)
Until you have five commands which all use the prefix `sort-incoming-` and then three commands named `sort-incoming-hourly` and `sort-incoming-monthly` etc.
Re:Start all of your commands with a comma (2009) by layer8 on Thursday June 23, 2022 @05:25PM (#31855342)
It would be nice to have camel-case completion in the shell, i.e. have “SIH” be completed to “SortIncomingHourly” and “SIM” to “SortIncomingMonthly”, etc. (only for upper-case characters). That way one could get more mileage out of the possible character combinations.
Re:Start all of your commands with a comma (2009) by andra_nl on Thursday June 23, 2022 @06:43PM (#31856015)
Well, not exactly tab completion, but I have `fzf`[0] tied to my history search.

That allows me to type `soriloco`, punch ctrl+r and be prompted with `some ridiculously long command` (if, of course, I've run it before).

Combined with infinite history this trick has saved me a bunch of typing and even proper remembering. :P

[0]: https://github.com/junegunn/fzf

Re:Start all of your commands with a comma (2009) by keybored on Sunday June 26, 2022 @11:15AM (#31884744)
Yes, fuzzy matching is the way to go. Tab completion isn’t good enough any more.
Re:Start all of your commands with a comma (2009) by bergenty on Thursday June 23, 2022 @08:16PM (#31856607)
Why do the names have to be shorter, I never have to type it all out just the first couple of letters and then autocomplete. Dealing with aliases/“shortcuts” is such a pain plus I hate that pattern anyways.