Customise Mac Terminal command: Control+w
Not directly modifying ctrl + W, but the same behaviour can be achieved using ESC  + delete. Every time, escape key would have to be released and then pressed. 


Mac Terminal: Delete a word at time