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
~
/Users/diddy
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 🤝
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The fact that it's on two lines seems to be the problem. You can use quoting for directories with spaces:
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:
You have to remove the
~
at the beginning, that's an alias for/Users/diddy
alreadyor you can do
Perfect, used alias cloud='cd ~/Library/"Mobile Documents"/com~apple~CloudDocs' and it finally worked.
Thank you 🤝