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 Apr 5

What was your win this week?

Got to all your meetings on time? Started a new project? Fixed a tricky bug?

🇭🇹 DEDE profile image
Curious programmer