Hacker News new | ask | show | jobs
by victor141516 727 days ago
I use different namespaces for different convenience scripts, and use the notation [character].[command] for all of them.

I've used a character for each company I've worked for, and a different one for common scripts. This way is very easy to clean $HOME when I move.

1 comments

I like the idea of using periods for collections of commands. I have a todo list hacked together with shell scripts and I've been thinking about how I might want to stay away from collisions. I think I'll use do.thing style commands, so my commands will be:

  do.item  Add an item to the bottom of my todo list  
  do.soon  List the items that I need to do soon  
  do.next  List the next item to work on  
  do.mark  Mark the current item done
How do you implement namespaces? Is it just that you do this with all the commands you create for this company?
I liked the idea of this but it won't work for me in practice. A down-side of periods is that you can't use them in an `alias`. Since that is how I configure a lot of these commands the period is probably not an option I can use consistently.
> How do you implement namespaces? Is it just that you do this with all the commands you create for this company?

Exactly. It's super barebones but it works haha.