Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Spaces in your .cshrc aliases?

Spaces in your .cshrc aliases?
Thread Tools
BostonMACOSX
Forum Regular
Join Date: Nov 2000
Location: Boston Area,ma
Status: Offline
Reply With Quote
Oct 28, 2002, 03:47 PM
 
Ok here is a stupid simple question, but I can't seem to get it right.

alias msfolder "cd ~/Documents/Microsoft User Data"

when I run msfolder I get

cd: Too many arguments.

I though that the quote took care of the spaces?

Thanks
BostonMACOSX
OSX ...Plastic surgery for unix
Boston Area Consulting
http://rjhcc.dyndns.biz
http://bostonmacosx.dyndns.org
     
dudesteve
Fresh-Faced Recruit
Join Date: Feb 2002
Status: Offline
Reply With Quote
Oct 28, 2002, 04:13 PM
 
you still need to escape the spaces:

alias msfolder "cd ~/Documents/Microsoft\ User\ Data"
     
Detrius
Professional Poster
Join Date: Apr 2001
Location: Asheville, NC
Status: Offline
Reply With Quote
Oct 28, 2002, 07:07 PM
 
The above command is correct. The reason:

The quotes you put in fix the problem for the alias command. So, when you run msfolder, everything INSIDE the quotes is run as the command... so the quotes are gone when the command actually gets run. At that point, the directory name looks like multiple arguments to the cd command. That's why you have to escape the spaces, even inside the quotes.
ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 05:19 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,