In bash, you can use the backslash character ("\") to escape any character. However, if a single quote is inside single quotes, it cannot be escaped with a backslash character. For example:
works fine but
alias ycd='command -option 'something'' alias ycd='command -option \'something\''
both of the above return errors.
A trick around this problem is to use both quotes i.e. use double quotes to surround the single quote and single quotes again to surround the single quote.