I was inspired by this gadget that is sold especially for the purpose-an orange plastic container with a clear plastic dome. It's OK, but a real pain to use. It isn't always the correct size and is difficult to fit. By comparison, an old jar or plastic container with a clear bag is super easy to use-and free!
You can use the same technique for green onions. I've kept them in a container on the counter, clipped them as needed and then watched as the green tops grew back.