summaryrefslogtreecommitdiff
path: root/freebase/fcl/commands.py
diff options
context:
space:
mode:
authoralex.boterolowry <alex.boterolowry@5914aa95-5b3a-0410-a3b5-7b719e7fe9b2>2009-11-13 21:52:00 +0000
committeralex.boterolowry <alex.boterolowry@5914aa95-5b3a-0410-a3b5-7b719e7fe9b2>2009-11-13 21:52:00 +0000
commitb8407d8322436508f91c9f83f12662002d57c82b (patch)
tree8819bf67e8ed2def6ef39ee98b44d924fbfa76c1 /freebase/fcl/commands.py
parent472117ea73f75dfbadfddac05ca42623278525d9 (diff)
add basic cd/pwd suport
git-svn-id: http://freebase-python.googlecode.com/svn/trunk@224 5914aa95-5b3a-0410-a3b5-7b719e7fe9b2
Diffstat (limited to 'freebase/fcl/commands.py')
-rwxr-xr-xfreebase/fcl/commands.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/freebase/fcl/commands.py b/freebase/fcl/commands.py
index 3e7ba4b..804f3d9 100755
--- a/freebase/fcl/commands.py
+++ b/freebase/fcl/commands.py
@@ -259,6 +259,13 @@ def cmd_mv(fb, src, dst):
cmd_ln(fb, src, dst)
cmd_rm(fb, src)
+def cmd_cd(fb, path):
+ path = fb.absid(path)
+ fb.pwd = path
+
+def cmd_pwd(fb):
+ print fb.pwd
+
def cmd_cat(fb, id, include_headers=False):
"""download a document from freebase to stdout
%prog cat id