If your argument has spaces, it will treat each space delimited part as a separate argument.
To prevent this, specify any arguments with spaces, for example:
ln -s "$PWD" "$HOME/my link name with spaces"
If the file name has quotes, you can also escape it with a backslash
ln -s "$PWD" "$HOME/my link name with spaces and this quote\""
Instead of $ HOME you can use:
ln -s "$PWD" ~/"my link name with spaces"
source
share