I'm trying to create the following alias in Ubuntu WSL:
alias windocs='cd /mnt/c/Users/Firstname L'astname/Documents/'
My username is unfortunately Firstname L'astname, including the space and apostrophe.
I've tried using backslashes:
alias windocs='cd /mnt/c/Users/Firstname\ L\'astname/Documents/'
But bash still interprets the apostrophe as the end of the string, resulting in the following error:
-bash: .bash_aliases: line 11: unexpected EOF while looking for matching `''
-bash: .bash_aliases: line 12: syntax error: unexpected end of file
I've also tried encapsulating the username in double-quotation marks:
alias windocs='cd /mnt/c/Users/"Firstname L'astname"/Documents/'
And I get the same error.
How can I write this alias so that it works? It's a pain having to cd all the way to the Documents folder every time.