I am using WSL2 Ubuntu with Windows. I have an alias opening Notepad++ on Windows defined inside WSL like this:
alias npp="/mnt/c/Program\ Files/Notepad++/notepad++.exe"
and it works... but as soon as I add another alias, e.g.
alias npp="/mnt/c/Program\ Files/Notepad++/notepad++.exe"
alias l="ls -l"
I get the error - : No such file or directory/Notepad++/notepad++.exe
. It works only when it is the last alias defined in the file.
My guess is it might have something to do with a space in the Notepad++ path but I am not really sure anymore. I tried different ways of escaping with no luck. What is happening here, what's the cause and the fix?