news.volyx.in

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

655 points by theblazehen · 167 days ago · 244 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 for easy tab-completion and avoids conflicts with system commands. The author has been using this technique for over a decade and finds it to be robust and useful. The technique is simple and elegant, making it easy to implement and use.

Main themes

  • Unix command naming conventions
  • Command name collisions
  • Custom command scripts
  • Tab-completion
  • System configuration

What commenters say

  • Prefixing custom command names with a comma is a useful technique for avoiding name collisions and making tab-completion easier.
  • Some users prefer to use aliases or modify the PATH environment variable to avoid command name collisions instead of prefixing with a comma.
  • Others argue that prefixing with a comma is unnecessary and may lead to extra typing, and that using the full path to a command is not a significant inconvenience.
  • There are security concerns with adding a custom script directory to the PATH, as it may allow malicious scripts to be executed if the directory is writable by others.
  • Using a comma prefix can help protect against future system updates introducing new commands with the same name as custom scripts.
  • Some users find the comma prefix technique to be more convenient than using aliases or modifying the PATH, as it allows for easy discovery of custom commands using tab-completion.
  • The technique is not foolproof and may not work in all situations, such as when a custom script has the same name as a system command that is not in the default PATH.