Add an argument to word_before_cursor to be WORD compatible.

This allows me to decide whether to include special characters when extracting the word_before_cursor(). 

This is useful if my cli has words with special characters. For example, postgres cli will have special commands such as `\dt`, in which case we want the word_before_cursor() to return the word including the character `\`.