School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,110 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,030 people online right now. Registration is fast and FREE... Join Now!




ZSH and CDPATH

 

ZSH and CDPATH

THX1138

3 Oct, 2009 - 02:47 PM
Post #1

New D.I.C Head
*

Joined: 14 Dec, 2007
Posts: 16


My Contributions
Hi everybody,

I have created a zsh function that extends the functionality of the cd command:
CODE

function c () {
  \cd $1
  p
  ls -AGF
}


It works exactly the way I want it to. The problem is that it doesn't "recognize" the CDPATH. I've set the CDPATH to my home directory, and it works fine with cd but not with c...

Is there a way to make the c function work with the CDPATH please?

EDIT

By the way, p is also one of my functions:
CODE

function p () {
  echo -n -e "You're in: $fg[blue]$bg[blue]"
  pwd
  echo -n -e "$fg[default]$bg[default]\n"
}



This post has been edited by THX1138: 3 Oct, 2009 - 02:49 PM

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 01:04PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month