Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: making `cd` work unquoted
- X-seq: zsh-users 14257
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: spiralofhope <spiralofhope@xxxxxxxxx>, zsh-users@xxxxxxxxxx
- Subject: Re: making `cd` work unquoted
- Date: Sat, 25 Jul 2009 11:17:22 -0700
- In-reply-to: <20090725091008.7af5b873@xxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20090725091008.7af5b873@xxxxxxxxx>
On Jul 25, 9:10am, spiralofhope wrote:
}
} I'm trying to make a function which will accept this:
} cd foo bar baz
} and have it acted upon as:
} cd "foo bar baz"
}
} So far, I've run into a few snags.
}
} I don't see how I can make a 'cd' function which will refer to the
} 'cd' builtin. Not a big deal, I could call the function 'ccd'.
cd() { builtin cd "$*" }
} I can't do something simple like cd "$@"
"$@" is the same as "$1" "$2" "$3" ...
"$*" is the same as "$1 $2 $3 ..."
(note placement of quotes)
You should probably find a book on basic shell programming and learn
the elements of shell language behavior before you try to dive in
with the zsh manual. It's not written as a tutorial, and the zsh
tutorials that exist assume knowledge of the basics.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author