Hacker News new | ask | show | jobs
by jeff303 4796 days ago
Thanks, your "x" function looks useful. May I ask about the organization? Why the NN- prefix for filenames? Some type of standard I'm not aware of?
2 comments

When the contents of .bash are sourced it will be done in filename order. Some files might rely on others being sourced first. So using the numeric prefix allows controlling the order while still having meaningful names.
I tend to do that when I'm using run-parts, or similar processing over a directory of files that will all be read. It ensures that files are always loaded in a predictable order.

Usually it doesn't matter, but if you have dependencies it allows you to express them in a simple fashion. (e.g. defining a function in one file, and using it in another.)