upysh: Add "rm" and "rmdir" commands.

Also simplified "cd" implementation.
pull/78/head
Paul Sokolovsky 2016-06-12 18:57:14 +03:00
rodzic ceab4f3b84
commit d9b7dd1d06
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -28,11 +28,11 @@ class PWD:
pwd = PWD()
ls = LS()
def cd(path):
os.chdir(path)
cd = os.chdir
mkdir = os.mkdir
mv = os.rename
rm = os.remove
rmdir = os.rmdir
def head(f, n=10):
with open(f) as f:
@ -63,5 +63,5 @@ builtins.help()
upysh commands:
pwd, cd("new_dir"), ls, ls(...), head(...), cat(...)
mkdir(...), newfile(...)
newfile(...), rm(...), mkdir(...), rmdir(...)
""")