Cut the long beans into 1 inch pieces. If the beans are really fresh, you can just snap them into pieces with your fingers.
Heat oil in a frying pan and add the mustard seeds. After the seeds splutter, add the sliced shallots/ pearl onions and crushed garlic. Mix well and fry for a few minutes until the onions start to soften and cook.
Add the slit green chillies, curry leaves and the coconut slivers. Mix well.
Add the turmeric powder and the chilli powder and combine well. Add salt and stir well until the raw spice smell fades.
Add the beans and mix well. Sprinkle the mix with a little water (about 2 tablespoons). Cover the pan and cook on low heat for 10 minutes or until the beans are cooked and soft.
Open the lid and stir-fry until all the water evaporates and the beans are browned. Serve hot with rice.