news.volyx.in

Start all of your commands with a comma (2009) (rhodesmill.org)

411 points by vmbrasseur · 779 days ago · 165 comments on HN

Article summary

The article discusses a technique for avoiding command name collisions in Unix systems by prefixing custom command names with a comma. This approach allows users to create their own commands without worrying about conflicts with system commands. The author has been using this method for over a decade and finds it to be robust and convenient. The comma prefix also enables easy tab-completion of custom commands.

Main themes

  • Command name collisions
  • Unix shell scripting
  • Custom commands
  • Namespace management
  • Tab completion

What commenters say

  • Prefixing custom commands with a comma is a useful technique for avoiding name collisions with system commands.
  • Some users prefer to put their custom bin directory at the front of their PATH, which can also avoid collisions, but may cause issues with certain tools.
  • The problem of command name collisions is not significant enough to warrant a special solution, and users can simply choose unique names for their custom commands.
  • Using a comma prefix makes it easy to use tab-completion to list and run custom commands, which can be more convenient than typing out the full command or using a separate command to list available commands.
  • Some users have had issues with command name collisions in the past, particularly with short, common command names, and appreciate the comma prefix solution.
  • The comma prefix approach may not be necessary for users who use longer, more unique command names, or who use other methods to manage their custom commands.
  • The use of a comma prefix can make custom commands more discoverable and easier to use, especially when combined with tab-completion tools like fzf.
  • Some users disagree with the need for a special prefix, and instead suggest that system commands should be namespaced or have a distinct prefix to avoid collisions.