In a large pan, sauté onion in oil over medium heat until onions begin to look translucent.
Add garlic (and parsley if using) and sauté for one more minute.
Transfer onion mixture to a plate or bowl.
Add green beans to pan and sauté for two minutes.
Add water (or broth) and seasonings to pan. Cover and bring to boil. Reduce heat to a very low boil and allow beans to cook until tender. (This will take about 10 minutes, but time will vary depending on the variety, age, and size of green beans and depending on your personal preferences.)
When beans are tender, transfer to a serving dish, and season to taste. (If pistachios have salt on them, don’t add too much salt to beans.)
Top with onion mixture and then chopped pistachios.
Serve with lemon wedges to squeeze fresh lemon juice on beans to taste.