Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update cd() docs to explicitly reference lcd()

  • Loading branch information...
commit 30f3307d010eb052a530cc346316521759db029d 1 parent bb9b486
@bitprophet bitprophet authored
Showing with 8 additions and 3 deletions.
  1. +8 −3 fabric/context_managers.py
View
11 fabric/context_managers.py
@@ -143,12 +143,15 @@ def my_task():
def cd(path):
"""
- Context manager that keeps directory state when calling operations.
+ Context manager that keeps directory state when calling remote operations.
Any calls to `run`, `sudo`, `get`, or `put` within the wrapped block will
implicitly have a string similar to ``"cd <path> && "`` prefixed in order
- to give the sense that there is actually statefulness involved. `cd` only
- affects the remote paths for `get` and `put` -- local paths are untouched.
+ to give the sense that there is actually statefulness involved.
+
+ .. note::
+ `cd` only affects *remote* paths -- to modify *local* paths, use
+ `~fabric.context_managers.lcd`.
Because use of `cd` affects all such invocations, any code making use of
those operations, such as much of the ``contrib`` section, will also be
@@ -195,6 +198,8 @@ def cd(path):
.. versionchanged:: 1.0
Applies to `get` and `put` in addition to the command-running
operations.
+
+ .. seealso:: `~fabric.context_managers.lcd`
"""
return _change_cwd('cwd', path)
Please sign in to comment.
Something went wrong with that request. Please try again.