fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] RFC: Implementing a current working directory / path refa


From: Jeff Forcier
Subject: Re: [Fab-user] RFC: Implementing a current working directory / path refactoring feature
Date: Mon, 24 Nov 2008 08:28:50 -0500

On Mon, Nov 24, 2008 at 5:12 AM, Nicolas Steinmetz <address@hidden> wrote:

> Ok, understood. I think I'm more clear now on cd() with the last
> conversations.

Sorry we weren't more clear from the beginning :) Yes, the idea here
is that cd() sets *or* updates the remote working directory, exactly
as if you were in an FTP client or a shell. So calling it multiple
times over the course of a Fab task will have the expected effect.

> Last thought about cd : can we unset it in a bundle of commands ?

I'm imagining that fab_cwd's default value is the empty string; thus,
when cd() is never called, fab_cwd doesn't really "take effect"
($some_path + empty_string == $some_path). Therefore, 'unsetting'
fab_cwd is as simple as resetting it to the empty string, e.g. cd('').
If memory serves, however, relative paths have always either been
undefined or implicitly prefixed with $HOME, so 'unsetting' it
entirely doesn't (to my mind) make a lot of sense :)

Again, just think of it as setting/updating a prefix string that gets
tacked on to remote paths, and this should make more sense.

-Jeff




reply via email to

[Prev in Thread] Current Thread [Next in Thread]