markdown guide
 

The fact that it's on two lines seems to be the problem. You can use quoting for directories with spaces:

➜  ~ mkdir testalias
➜  ~ cd testalias
➜  testalias mkdir -p "Mobile Documents/com~apple~CloudDocs"
➜  testalias tree
.
└── Mobile\ Documents
    └── com~apple~CloudDocs

2 directories, 0 files
➜  testalias alias cloud='cd "Mobile Documents"/com~apple~CloudDocs'
➜  testalias cloud
➜  com~apple~CloudDocs pwd
/Users/rhymes/testalias/Mobile Documents/com~apple~CloudDocs

BTW make sure that the directory actually exists :)

 

alias cloud='cd ~/Users/diddy/Library/"Mobile Documents"/com~apple~CloudDocs'

Still giving me the error message :-(

 

I got it, it's:

alias cloud='cd /Users/diddy/Library/"Mobile Documents"/com~apple~CloudDocs'

You have to remove the ~ at the beginning, that's an alias for /Users/diddy already

or you can do

alias cloud='cd ~/Library/"Mobile Documents"/com~apple~CloudDocs'

Perfect, used alias cloud='cd ~/Library/"Mobile Documents"/com~apple~CloudDocs' and it finally worked.

Thank you 🤝

 
 
Classic DEV Post from Jan 28

Three Arguments for Why You Should Write More

🇭🇹 DEDE profile image
Curious programmer

Sore eyes?

dev.to now has dark mode.

Go to the "misc" section of your settings and select night theme ❤️

(There is also a pink mode)