The issue with digispark attiny85 was that it was detectig(the light was on) with usb adapter but I was not able to upload the programs in it, IDE was not at all detecting the hardware. And the boarb was working fine in the windows environment.
So the following commands worked for me:
cd ~/Library/Arduino15/packages/digistump/tools/micronucleus/2.0a4/
chmod a+wx launcher
chmod a+wx micronucleus
source https://www.hackster.io/achindra/setting-up-digispark-attiny85-e96200